private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { HandleException(e.Exception); }