Add backtrace to error function
This commit is contained in:
parent
af490330e7
commit
5b518ed2fe
|
@ -10,6 +10,12 @@ print = minetest.debug
|
||||||
math.randomseed(os.time())
|
math.randomseed(os.time())
|
||||||
os.setlocale("C", "numeric")
|
os.setlocale("C", "numeric")
|
||||||
|
|
||||||
|
local errorfct = error
|
||||||
|
error = function(text)
|
||||||
|
print(debug.traceback(""))
|
||||||
|
errorfct(text)
|
||||||
|
end
|
||||||
|
|
||||||
-- Load other files
|
-- Load other files
|
||||||
local modpath = minetest.get_modpath("__builtin")
|
local modpath = minetest.get_modpath("__builtin")
|
||||||
dofile(modpath.."/serialize.lua")
|
dofile(modpath.."/serialize.lua")
|
||||||
|
|
|
@ -2,6 +2,12 @@ print = engine.debug
|
||||||
math.randomseed(os.time())
|
math.randomseed(os.time())
|
||||||
os.setlocale("C", "numeric")
|
os.setlocale("C", "numeric")
|
||||||
|
|
||||||
|
local errorfct = error
|
||||||
|
error = function(text)
|
||||||
|
print(debug.traceback(""))
|
||||||
|
errorfct(text)
|
||||||
|
end
|
||||||
|
|
||||||
local scriptpath = engine.get_scriptdir()
|
local scriptpath = engine.get_scriptdir()
|
||||||
|
|
||||||
mt_color_grey = "#AAAAAA"
|
mt_color_grey = "#AAAAAA"
|
||||||
|
|
Loading…
Reference in New Issue