title: A generic function that catches all the crashes
body: <p>I have a WPF application. </p>
  
  <p>I want the application to have a generic function that catches all the crashes that aren't in a try-catch block. The application shouldn't crash and stop working. Instead, it should reboot itself to try geting operational again. If it turns out the app is really messed up it shouldn't enter in an endless loop of reboots.</p>
  
  <p>I tried using AppDomain.UnhandledExceptionHandler, and it really cateches the exceptions that are thrown, but after that method is executed - the program still crashes.</p>
  
  <p>Is there a way to do this?</p>