Graphics commands without Graphics errors

BlitzMax Forums/BlitzMax Bug Reports/Graphics commands without Graphics errors

Well then you definitely need to read the documentations now on Try, Catch, Throw!

Throw is mainly for release mode.
Debug mode error prevention can be enforced through assert, as they are simply ignored in release, while Throw -> Try - Catch - EndTry are the release time error handling mechanisms that work independently of the scope depth to allow the programmer to handle errors at all, as you otherwise will only get the well known Memory access violation errors of Blitz3D / BlitzPlus.


tonyg:
Users don't move anything. Users get compiled applications. Its the programmer that is in charge to use think about how to handle errors.

a) if he hasn't forgotten it, then it failed -> will be cought by try catch
b) there is no before, its within the try catch and it is the only thing within the try catch. if the generation fails the user will get a usefull error message (if the programmer added one logically)


As mentioned, just copy paste above code and replace your graphics with it. You won't run into the null object error anymore unless you are not even capable of first initializing objects you are working on (thats programmers basics, so I assume that shouldn't be a problem if you post bug reports)