If an unhandled exception occurs, do I need to close my WPF application?

I have a WPF application, basically the exe is the loader for the UI of the application and sometimes when there is unhandled execution a message box is shown and when I click ok it disappears, the UI disappears etc., the exe instance is still exists, I need some mechanism that, when and an exception that is unhandled, exits the exe, since I have code that checks multiple instances so that the user can kill the crashed instance. Any suggestions or code?

0


a source to share


1 answer


You can handle these exceptions in the Application.DispatcherUnhandledException event



+1


a source







All Articles