mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-22 15:48:48 -05:00
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())
|
||||
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")
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user