mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add backtrace to error function
This commit is contained in:
parent
af490330e7
commit
5b518ed2fe
2 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue