1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00: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

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