pcall errhand;

This commit is contained in:
bjorn 2017-03-08 13:04:49 -08:00
parent d4a36614b0
commit dfe1242332
1 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,9 @@ static int handleLuaError(lua_State* L) {
if (lua_isfunction(L, -1)) {
lua_pushstring(L, message);
lua_call(L, 1, 0);
if (lua_pcall(L, 1, 0, 0)) {
error(lua_tostring(L, -1));
}
} else {
error(message);
}