mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-22 23:58:48 -05:00
Revert "Add backtrace to error function"
This reverts commit 5b518ed2fe
.
This caused duplicate tracebacks and tracebacks when unwanted.
It also ignored the level argument to error() and didn't pass the message (or level) to debug.traceback().
Use xpcall() or lua_pcall()'s errorhandler argument instead.
This commit is contained in:
parent
885e93df44
commit
e3bdd7b2ed
@ -10,12 +10,6 @@ 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,12 +2,6 @@ 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