From fa541515f0d0d63083413ce7ba83b71a3c7682b0 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 12 Jan 2016 18:25:01 +0000 Subject: 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 --- src/host/premake.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3