diff options
-rw-r--r-- | builtin/builtin.lua | 6 | ||||
-rw-r--r-- | builtin/mainmenu.lua | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/builtin/builtin.lua b/builtin/builtin.lua index 34477e6aa..99242f3d2 100644 --- a/builtin/builtin.lua +++ b/builtin/builtin.lua @@ -10,6 +10,12 @@ print = minetest.debug math.randomseed(os.time()) os.setlocale("C", "numeric") +local errorfct = error +error = function(text) + print(debug.traceback("")) + errorfct(text) +end + -- Load other files local modpath = minetest.get_modpath("__builtin") dofile(modpath.."/serialize.lua") diff --git a/builtin/mainmenu.lua b/builtin/mainmenu.lua index ab8dbe144..c5981caa6 100644 --- a/builtin/mainmenu.lua +++ b/builtin/mainmenu.lua @@ -2,6 +2,12 @@ print = engine.debug math.randomseed(os.time()) os.setlocale("C", "numeric") +local errorfct = error +error = function(text) + print(debug.traceback("")) + errorfct(text) +end + local scriptpath = engine.get_scriptdir() mt_color_grey = "#AAAAAA" |