From bc4ea90eb53d561371c8789a619324187918632c Mon Sep 17 00:00:00 2001 From: "bart@bartbes.ath.cx" Date: Sat, 17 Apr 2010 22:01:56 +0200 Subject: [PATCH] Modified output of error_printer to no longer show the error handlers or the 'main chunk' --- src/scripts/boot.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/boot.lua b/src/scripts/boot.lua index 6db6cce6c..c1e6f8f95 100644 --- a/src/scripts/boot.lua +++ b/src/scripts/boot.lua @@ -766,13 +766,13 @@ end local debug = debug -local function error_printer(msg) - print((debug.traceback("Error: " .. msg, 3):gsub("\n[^\n]+$", ""))) +local function error_printer(msg, layer) + print((debug.traceback("Error: " .. msg, 1+(layer or 1)):gsub("\n[^\n]+$", ""))) end function love.errhand(msg) - error_printer(msg) + error_printer(msg, 2) if not love.graphics or not love.event or not love.graphics.isCreated() then return