I have an application that, as any other app, crashes once in a while for various reasons.
When it crashes, it does it gracefully and the users get a nice message of the crash. At the same time the crash is reported on the server for analysis so it can be fixed in future versions. However, I would like that the app keeps working through the crash.
What that means is that I would like to run the forms in an ‘atomic’ way. If it goes down, it doesn’t take down the entire app. The users should just need to start over the work done with the particular form.
Is this something that can be done through architecture? Or maybe the new framework versions has something to aid this?
The application is build mostly in C# over the 3.5 framework, but it also uses some external references, some COMs and web service references.
I am not interested in an answer: ‘well fix the crashes’. Me and my team and the testing team are working round the clock for this.
Depending on what type of application it is there is an un-handled exception handler
in most appliactions.
In a Web Applications the System.Web.HttpApplication has an Error event.
In a Wpf Applications System.Windows.Application has a DispatcherUnhandledException event.
In Windows forms the System.Windows.Forms.Application has a ThreadException event.
You can hook in to these events and handle any exception which is out of your control.