mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 21:43:34 +00:00
pcall errhand;
This commit is contained in:
parent
d4a36614b0
commit
dfe1242332
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue