From a76e7698b21d51594d82e329d3825ee86e653295 Mon Sep 17 00:00:00 2001 From: Rogier Date: Mon, 25 Jul 2016 18:43:15 +0200 Subject: 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. --- src/script/cpp_api/s_base.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/script/cpp_api/s_base.h') 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; -- cgit v1.2.3