1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 20:43:35 +00:00

pcall errhand;

This commit is contained in:
bjorn 2017-03-08 13:04:49 -08:00
parent d4a36614b0
commit dfe1242332

View file

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