I have a WPF Application basically the exe is a loader for the application UI and sometimes when a unhandled execption occurs the message box is shown and when I click ok it goes away,the UI vanishes etc..,the instance of the exe is still there,I need some mechanism that when and exception that is unhandled occurs shutdown the exe since i have code that checks for multiple instances so the user would have to kill the crashed instance.Any suggestions or code?
Asked
Active
Viewed 790 times
0
-
Do you load the Application UI in a separate AppDomain or process? If not, an unhandled exception that takes down the UI should also take down the process, unless you are explicitly catching the exception somewhere in your loader. – David Nelson May 26 '09 at 13:48
1 Answers
1
You can handle these exceptions in the Application.DispatcherUnhandledException event

Thomas Levesque
- 286,951
- 70
- 623
- 758
-
-
Well, I guess it depends on what your application does, and what the exception is... – Thomas Levesque May 26 '09 at 10:40
-
exception can be anything right :-) and module could throw an exception if something went wrong hence the above question.The loader.exe is just a loader that loads the menu ui all the ui elements etc are abstracted so i feel its ok so shutdown mm.. – abmv May 26 '09 at 11:04