aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-04-23 22:37:27 -0400
committerShadowNinja <shadowninja@minetest.net>2014-04-24 18:27:25 -0400
commite3bdd7b2ed6362c0d84d2e30e48089271695b667 (patch)
tree58df584ab86feb6b4a788ff470a7383c1432bafc
parent885e93df445c65130e46b9bcc815e0b17acedf27 (diff)
downloadminetest-e3bdd7b2ed6362c0d84d2e30e48089271695b667.tar.gz
minetest-e3bdd7b2ed6362c0d84d2e30e48089271695b667.tar.bz2
minetest-e3bdd7b2ed6362c0d84d2e30e48089271695b667.zip
Revert "Add backtrace to error function"
This reverts commit 5b518ed2feff28c9bf21ad940c1b211b72d71bd1. 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.
-rw-r--r--builtin/builtin.lua6
-rw-r--r--builtin/mainmenu.lua6
2 files changed, 0 insertions, 12 deletions
diff --git a/builtin/builtin.lua b/builtin/builtin.lua
index dc428220a..a51264618 100644
--- a/builtin/builtin.lua
+++ b/builtin/builtin.lua
@@ -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")
diff --git a/builtin/mainmenu.lua b/builtin/mainmenu.lua
index 4cd1503da..67e0113bc 100644
--- a/builtin/mainmenu.lua
+++ b/builtin/mainmenu.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"