mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
The default error handler is assigned to love.errorhandler.
This commit is contained in:
@@ -215,7 +215,7 @@ local function error_printer(msg, layer)
|
||||
print((debug.traceback("Error: " .. tostring(msg), 1+(layer or 1)):gsub("\n[^\n]+$", "")))
|
||||
end
|
||||
|
||||
function love.errhand(msg)
|
||||
function love.errorhandler(msg)
|
||||
msg = tostring(msg)
|
||||
|
||||
error_printer(msg, 2)
|
||||
@@ -340,5 +340,8 @@ function love.errhand(msg)
|
||||
|
||||
end
|
||||
|
||||
-- Legacy code support.
|
||||
love.errhand = love.errorhandler
|
||||
|
||||
-- DO NOT REMOVE THE NEXT LINE. It is used to load this file as a C++ string.
|
||||
--)luastring"--"
|
||||
|
||||
Reference in New Issue
Block a user