-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to lily.quit()
on love.errorhandler
?
#5
Comments
I somehow managed to get it right without completely rewrite the errorhandler. -- cache the function
local old_errorhandler = love.errorhandler
function love.errorhandler(msg)
-- quit lily before original errorhandler get called
local lily = package['lily'] or package['libs.lily'] or package['path.to.lily'] or nil
if lily then
lily.quit()
end
-- call original cached errorhandler function
old_errorhandler(msg)
end |
Above solution doesn't work. On unexpected error, the program simply quits without tell any error. I had to uncomment it. |
|
That's because LÖVE's default error handler is actually in |
Closing this issue. |
I managed to get lily quit on
love.quit
callback by following code:But how to do it on
love.errorhandler
. Without it, an usual error iflily.quit()
is not called popped out after the error message displayed and program quited.The text was updated successfully, but these errors were encountered: