How to exit graphics on error?
BlitzMax Forums/BlitzMax Beginners Area/How to exit graphics on error?
| ||
Hi. I am debugging a program that enters the graphics mode but, when the exectuin meets an error, I just hear the "error sound" but the graphic window doesn't automatically exits from the graphics mode. Is there a way to enable it or a walkaround? |
| ||
Ooops, I posted in the wrong forum. Could a mod move my topic in the right section? Thanks. |
| ||
Better to run in windowed mode for testing. (this should be in one of the programming forums, not Tutorials) |
| ||
EndGraphics, maybe? |
| ||
Use a Try/Catch. RuntimeErrors throw an exception.Try Main() Catch a:Object EndGraphics Throw a End Try Function Main() Graphics 640, 480, 16 RuntimeError "A bad thing happened" End Function |