Exemple #1
0
 static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
 {
     try
     {
         Exception exception = e.Exception as Exception;
         //if (exception.Message.Contains("CustomDraw"))
         //{
         //    return;
         //}
         //else
         //{
             ExceptionMessageBox errBox = new ExceptionMessageBox(exception);
             errBox.ShowDialog();
             //throw exception;
         //}
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     try
     {
         Exception exception = e.ExceptionObject as Exception;
         //if (exception.Message.Contains("CustomDraw"))
         //{
         //    return;
         //}
         //else
         //{
             ExceptionMessageBox errBox = new ExceptionMessageBox(exception);
             errBox.ShowDialog();
             //throw exception;
         //}
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }