Fix error handling in Lua function run(). Made the samples use run() instead of dofile()
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1989 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -1432,9 +1432,9 @@ int L_Run(lua_State* L)
|
||||
// confusing than helpful.
|
||||
|
||||
if (nb_args>0 && (message = lua_tostring(L, nb_args))!=NULL)
|
||||
Verbose_message("Error running script", message);
|
||||
return luaL_error(L, message);
|
||||
else
|
||||
Warning_message("Unknown error running script!");
|
||||
return luaL_error(L, "run: Unknown error running script!");
|
||||
}
|
||||
nested_calls--;
|
||||
// restore directory
|
||||
|
||||
Reference in New Issue
Block a user