In my UI application (WPF/C#, using MVVM design pattern), I have implemented a global exception handler which catches all unexpected (hence uncaught) exceptions and reports the application crash to the user via a dedicated "crash report" window.
Instead of bombarding the user with the entire stack trace right away, I'd like to have a single line of text which either says "No data was modified - you're on the safe side" or "Data processing was aborted - your data might be inconsistent" (or something like that). I guess this would reassure users about the extent of the failure.
To do so, my model would need to keep track of "safe sections" and "critical sections" and the crash report window would need to evaluate this application state.
I'm wondering if this is a good idea at all and, more important, what would be a suitable approach to implement this. I was thinking about adding a public property to the Application
class (where my global exception handler already resides) and then bind the crash report view model to that. Maybe there is a better approach?
Do you have any references for me to get started?
Thank you very much in advance!