Try/EndTry command?

BlitzMax Forums/BlitzMax Beginners Area/Try/EndTry command?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Not to say there is a fundamental difference: It works across funciton calls. If function A calls function B whih calls Functions C, A can catch an exception raised by C.
It's a structured ways of handling errors, that doesn't require to clutter your code with error checking at each and every place an error can occur (with exception you can handle the error at the place you find the more appropriate, which can be way down in the call chain).

Your sample code is just a special case, exception handling allows much more. You'll find some more information by just searching the forum for "exception".