mirror of https://github.com/bjornbytes/lovr.git
Improve error message for main.lua syntax errors;
This commit is contained in:
parent
8c0e4bd416
commit
074e55dc8b
|
@ -109,7 +109,8 @@ void lovrInit(lua_State* L, int argc, char** argv) {
|
|||
// Preload libraries
|
||||
luax_preloadmodule(L, "json", luaopen_cjson);
|
||||
|
||||
if (luaL_loadbuffer(L, (const char*) boot_lua, boot_lua_len, "boot.lua") || lua_pcall(L, 0, 0, 0)) {
|
||||
lua_pushcfunction(L, getStackTrace);
|
||||
if (luaL_loadbuffer(L, (const char*) boot_lua, boot_lua_len, "boot.lua") || lua_pcall(L, 0, 0, -2)) {
|
||||
handleError(L, lua_tostring(L, -1));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue