Critical Error versus Non-Critical Error Behavior

delphi package - automated exception handling
Post Reply
michaelcone
Posts: 4
Joined: Wed Jul 02, 2014 7:01 pm

Critical Error versus Non-Critical Error Behavior

Post by michaelcone »

If this has been discussed elsewhere, please point me to that discussion.

Can anyone explain to me the mechanism that determines why some errors allow for "continue application" to be enabled and others disable this choice? My current best explanation is that some errors are critical and others are not. However, there must be a better way of understanding how this decision is made.

I have also noticed that for critical errors, it is possible that the error log is not updated before the application closes. My advice to end users if this happens is to capture the information in the Call Stacks menu with a camera before closing - because it may not be recorded in the log file. Is there a good reason why the log information is not written to the file for certain errors?
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Critical Error versus Non-Critical Error Behavior

Post by madshi »

The key difference is where the unhandled exception is caught. E.g. if madExcept catches an exception inside of some secondary thread, the "continue" button is enabled, because the thread dying doesn't mean the whole program goes down. If an exception occurs inside of the main thread, the "continue" button will be enabled if the exception was caught by some try..except block, so that program execution can continue after that try..except block. If, however, the exception occurred in the main thread, *and* was not caught by any try..except block, then without madExcept you could see something like "runtime error 216", followed by the program closing down, or maybe an OS crash box. In this situation the continue button is disabled, because there's no proper way to continue execution.
michaelcone
Posts: 4
Joined: Wed Jul 02, 2014 7:01 pm

Re: Critical Error versus Non-Critical Error Behavior

Post by michaelcone »

Madshi - That is very helpful. Thank you!

I think I will continue to explain it as "critical" versus "non-critical" to my end users. They aren't developers and have no concept of how error processing works internally.

As for my second question, I am just going to tell my users to take a picture of the General and Call Stacks menu before closing the application using the phone camera.

Thanks again!
Post Reply