A few of the commercial/closed source applications I use contain an external exception handler or crash catcher and I am wondering if anyone has ever implemented something like this and would be willing to discuss the use of such a method of exception handling?
Basically the way it appears to work is, when an application runs another application also runs separately but monitors the first watching for crashes. When an exception occurs that causes the first application to take a nose dive, the second application "catches" the exception, displays the standard "Sorry, this application died, here is some information you probably can't use...do you want to send this error to our tech support staff with a short description of what you were doing when the application died?" If the user says yes, the crash-catcher generates a text or some other type of object file that the user can either electronically transmit to the technical support staff at the company that produced the software via the internet or if no internet connection is available at the time of the crash, it saves the file to disk to be quietly transmitted later on when an internet connection is available or for the user to email to the tech support people.
Obviously the goal of any application is to handle any exception quietly and to make the user's life easier, but hey, let's face it, sometimes things are missed or overlooked.
So, I'm wondering a few things...
- I'm guessing that the main application would start the crash-catching application on startup, providing some information for it to monitor the correct application.
- How would it be possible for the main application to send the exception and other data to the crash-catching application if...well, it crashes? Obviously, if a crash or unrecoverable exception occurs and the application truly crashes, it ceases to function and closes, preventing it from sending or doing anything, so for that to work, there would need to be some sort of logic somewhere that says "if there's an exception that isn't handled, send the exception object to this other application and close."
- The other option, I'm guessing, would be for the crash-catcher to monitor something else without input from the main application and there would need to be some kind of way for it to know something didn't work right and to get as much info as it can from whatever source it is monitoring.
The reason I am contemplating this is because try/catch blocks make me nervous that if I forget to cover all of the possible exceptions, or fail to use a try/catch, that a user is going to have a problem performing some task and with that try/catch block potentially ignoring/not catching an error or missing one and not providing any useful information, I might not be able to fix it.