tostring all errors in the error handler (issue #332)

This commit is contained in:
Bart van Strien
2011-12-06 21:55:16 +01:00
parent 1503533ee6
commit a003f5d581
2 changed files with 9 additions and 5 deletions
+2 -1
View File
@@ -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)