Handle lua -> C# function invocation exceptions more gracefully
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user