diff options
author | Rogier <rogier777@gmail.com> | 2016-07-25 18:43:15 +0200 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2016-12-24 00:18:45 +0000 |
commit | a76e7698b21d51594d82e329d3825ee86e653295 (patch) | |
tree | a82a2002962ccac1aa01af6257d57d0c4bb973ad /src/script/cpp_api/s_base.h | |
parent | a95f983ea8665bfd14289b142cef1185838cc531 (diff) | |
download | minetest-a76e7698b21d51594d82e329d3825ee86e653295.tar.gz minetest-a76e7698b21d51594d82e329d3825ee86e653295.tar.bz2 minetest-a76e7698b21d51594d82e329d3825ee86e653295.zip |
Make minetest abort on lua panic
Currently, lua does a regular exit() after a lua panic, which can make
a problem hard to debug. Invoking FATAL_ERROR() instead will print
some useful information, and abort() minetest, so that a debugger can
be used to analyze the situation.
Diffstat (limited to 'src/script/cpp_api/s_base.h')
-rw-r--r-- | src/script/cpp_api/s_base.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_base.h b/src/script/cpp_api/s_base.h index f52474f00..c27235255 100644 --- a/src/script/cpp_api/s_base.h +++ b/src/script/cpp_api/s_base.h @@ -118,6 +118,8 @@ protected: #endif private: + static int luaPanic(lua_State *L); + lua_State* m_luastack; Server* m_server; |