How do I continue running after an unhandled exception?
I have the following code in my application that is running after an unhandled exception: AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { var exception = e.ExceptionObject as Exception; if (exception != null) MessageBox.Show(exception.Message + " - " + exception.StackTrace); } but even if i catch unhandled exception my windows mobile application close. How to prevent closing application when i catch unhandled exception. I never want to