Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2016-01-12 21:25:01 +0300
committerOliver Schneider <oliver@assarbad.net>2016-01-12 21:25:01 +0300
commitfa541515f0d0d63083413ce7ba83b71a3c7682b0 (patch)
treef4776a49e341b93ff6ab09038ae557b835d234dc
parent27c709185654723e997cfa0899b9e4c48bd56ad3 (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-xsrc/host/premake.c6
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;