1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 23:58:48 -05:00

Add backtrace to error function

This commit is contained in:
sapier 2013-08-25 12:54:16 +02:00 committed by Kahrl
parent af490330e7
commit 5b518ed2fe
2 changed files with 12 additions and 0 deletions

View File

@ -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")

View File

@ -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"