mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Modified output of error_printer to no longer show the error handlers or the 'main chunk'
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user