Xojo now generally uses exceptions to handle errors.
And with that comes some things you should know about how exceptions work that you need to be aware of before you cause yourself problems.
First off, in my opinion, you should put your try catch blocks as close to the code that causes the error. While Xojo lets you use one EXCEPTION or CATCH block at the end of any method like the following
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
// do a bunch of code
Catch foo As RuntimeException // or Exception foo as RuntimeException
Break
I would suggest you avoid this form.… Read the rest