Improve handling of errors in lua functions and speed up calls. (#1427)
This commit is contained in:
+2
-4
@@ -1060,8 +1060,7 @@ void Profile::LoadCustomFunction( RString sDir )
|
||||
LuaHelpers::Push(L, sDir);
|
||||
|
||||
// Run it
|
||||
RString Error= "Error running CustomLoadFunction: ";
|
||||
LuaHelpers::RunScriptOnStack(L, Error, 2, 0, true);
|
||||
LuaHelpers::RunScriptOnStack(L, 2, 0);
|
||||
|
||||
LUA->Release(L);
|
||||
}
|
||||
@@ -1344,8 +1343,7 @@ bool Profile::SaveAllToDir( RString sDir, bool bSignData ) const
|
||||
LuaHelpers::Push(L, sDir);
|
||||
|
||||
// Run it
|
||||
RString Error= "Error running CustomSaveFunction: ";
|
||||
LuaHelpers::RunScriptOnStack(L, Error, 2, 0, true);
|
||||
LuaHelpers::RunScriptOnStack(L, 2, 0);
|
||||
|
||||
LUA->Release(L);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user