Close the love window upon error?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- parallax7d
- Citizen
- Posts: 82
- Joined: Wed Jul 02, 2014 11:44 pm
Close the love window upon error?
currently if there is an error the love window will display it. Since I already get that error printed out to my shell, it's kind of redundant. Would there be a way to have the love window automatically close as soon as it's done printing the error?
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: Close the love window upon error?
You're looking for this.
In basics, you can just take out the while loop at the end of the love.errhand function.
Have fun!
In basics, you can just take out the while loop at the end of the love.errhand function.
Have fun!
-
- Party member
- Posts: 712
- Joined: Fri Jun 22, 2012 4:54 pm
- Contact:
Re: Close the love window upon error?
If you want to hide the error from users and instead display a nice "user friendly" error message, another option is to use pcall around everything you call from the love.load, love.draw, love.update etc. functions. Then you can catch the errors and do with them whatever you want to.
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
- parallax7d
- Citizen
- Posts: 82
- Joined: Wed Jul 02, 2014 11:44 pm
Re: Close the love window upon error?
Perfect, thanks Zilarrezko!
Germanunkol, that's not a bad idea. You could conceivably have a few options for the user, like restart game at last save, send in report, or even have a secret hidden minigame that you can only access when your game crashes!
Germanunkol, that's not a bad idea. You could conceivably have a few options for the user, like restart game at last save, send in report, or even have a secret hidden minigame that you can only access when your game crashes!
-
- Party member
- Posts: 712
- Joined: Fri Jun 22, 2012 4:54 pm
- Contact:
Re: Close the love window upon error?
Exactly.
Haha, I love the idea with the minigame
Haha, I love the idea with the minigame
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Re: Close the love window upon error?
Better patent it before someone else does or you'll be unable to do it for the next 20 years.parallax7d wrote:hidden minigame that you can only access when your game crashes
Re: Close the love window upon error?
I'm assuming you're pointing at nobody in particular (*cough* *cough* Namco and loading games *cough* *cough*).
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Who is online
Users browsing this forum: Google [Bot] and 45 guests