From 5b518ed2feff28c9bf21ad940c1b211b72d71bd1 Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 25 Aug 2013 12:54:16 +0200 Subject: Add backtrace to error function --- builtin/builtin.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'builtin/builtin.lua') 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") -- cgit v1.2.3