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);
|
objects.Add(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
return method.Invoke(_object, objects.ToArray()).ToLuaType();
|
return method.Invoke(_object, objects.ToArray()).ToLuaType();
|
||||||
}
|
}
|
||||||
|
catch (TargetInvocationException e)
|
||||||
|
{
|
||||||
|
if (e.InnerException != null) throw e.InnerException;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue