mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
tostring all errors in the error handler (issue #332)
This commit is contained in:
@@ -667,10 +667,11 @@ end
|
||||
local debug = debug
|
||||
|
||||
local function error_printer(msg, layer)
|
||||
print((debug.traceback("Error: " .. msg, 1+(layer or 1)):gsub("\n[^\n]+$", "")))
|
||||
print((debug.traceback("Error: " .. tostring(msg), 1+(layer or 1)):gsub("\n[^\n]+$", "")))
|
||||
end
|
||||
|
||||
function love.errhand(msg)
|
||||
msg = tostring(msg)
|
||||
|
||||
error_printer(msg, 2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user