views:

365

answers:

1

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?

+1  A: 

You can handle these exceptions in the Application.DispatcherUnhandledException event

Thomas Levesque
so is it ok to shutdown the loader exe in that case?
abmv
Well, I guess it depends on what your application does, and what the exception is...
Thomas Levesque
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 elementsetc are abstracted so i feel its ok so shutdown mm..
abmv