Throw early when Lua function parameters are null.
This commit is contained in:
committed by
Gustas
parent
52a916012f
commit
8433bc0948
@@ -50,7 +50,7 @@ namespace OpenRA.Scripting
|
||||
try
|
||||
{
|
||||
if (!IsMethod)
|
||||
throw new LuaException("Trying to invoke a ScriptMemberWrapper that isn't a method!");
|
||||
throw new LuaException($"Trying to invoke a {nameof(ScriptMemberWrapper)} that isn't a method!");
|
||||
|
||||
var mi = (MethodInfo)Member;
|
||||
var pi = mi.GetParameters();
|
||||
|
||||
Reference in New Issue
Block a user