Handle lua -> C# function invocation exceptions more gracefully
This commit is contained in:
parent
d6e18d9b0c
commit
8d6d6e45af
|
@ -75,7 +75,16 @@ namespace Upsilon.BaseTypes
|
|||
objects.Add(null);
|
||||
}
|
||||
}
|
||||
return method.Invoke(_object, objects.ToArray()).ToLuaType();
|
||||
|
||||
try
|
||||
{
|
||||
return method.Invoke(_object, objects.ToArray()).ToLuaType();
|
||||
}
|
||||
catch (TargetInvocationException e)
|
||||
{
|
||||
if (e.InnerException != null) throw e.InnerException;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue