Try, Catch, End Try

rbulph

Junior Contributor
Joined
Feb 17, 2003
Messages
397
If an error occurs in a procedure then the execution of the code looks up the call stack to find the first error handling procedure. That's fine. But when you're debugging, it would be better if execution just stopped at the error, so that you can see what's causing it. If your error is a long way down a chain it could be very hard to track down where exactly it's occurring. If there's no error handling, execution does stop at the error, so it's tempting to do away with error handling in your code. Is there any way to run your application in the debugger so that execution does stop at the error, in spite of their being error handling code applicable?
 
Under the Debug menu go to "Exceptions..."

What exactly you see depends on what version of what language(s) you are using, but there should be a way to stop execution not only on all exceptions, but you can pick and choose which exceptions to break on.
 
Back
Top