diff options
author | Oliver Schneider <oliver@assarbad.net> | 2016-01-12 21:25:01 +0300 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2016-01-12 21:25:01 +0300 |
commit | fa541515f0d0d63083413ce7ba83b71a3c7682b0 (patch) | |
tree | f4776a49e341b93ff6ab09038ae557b835d234dc | |
parent | 27c709185654723e997cfa0899b9e4c48bd56ad3 (diff) |
Missing tracebacks in release mode, so activating those ... after all Lua allows us to overwrite even internals, so this is useful even though we can't touch embedded scripts
--HG--
branch : WDS-build
-rwxr-xr-x | src/host/premake.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/host/premake.c b/src/host/premake.c index e93754e..8b9d550 100755 --- a/src/host/premake.c +++ b/src/host/premake.c @@ -378,9 +378,13 @@ static int load_builtin_scripts(lua_State* L) } } + /* in release mode, also show full traceback on all errors */ + lua_getglobal(L, "debug"); + lua_getfield(L, -1, "traceback"); + /* hand off control to the scripts */ lua_getglobal(L, "_premake_main"); - if (lua_pcall(L, 0, 1, 0) != OKAY) + if (lua_pcall(L, 0, 1, -2) != OKAY) { printf(ERROR_MESSAGE, lua_tostring(L, -1)); return !OKAY; |