Ejemplo n.º 1
0
 static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e)
 {
     Console.WriteLine("Unhandled exception occured, Sender: {0}, exception: {1}", sender, e.ExceptionObject);
     ErrorReporter.ErrorReportingForm errorForm = new ErrorReporter.ErrorReportingForm(string.Format("Unhandled exception {0}", e.ExceptionObject), e.ExceptionObject as Exception, true);
     if (e.IsTerminating)
     {
         MessageBox.Show("App will terminate when you click OK", "Fatal Exception", MessageBoxButtons.OK);
     }
 }
Ejemplo n.º 2
0
 static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e)
 {
     Console.WriteLine("Unhandled exception occured, Sender: {0}, exception: {1}", sender, e.ExceptionObject);
     ErrorReporter.ErrorReportingForm errorForm = new ErrorReporter.ErrorReportingForm(string.Format("Unhandled exception {0}", e.ExceptionObject), e.ExceptionObject as Exception, true);
     if (e.IsTerminating)
     {
         MessageBox.Show("App will terminate when you click OK", "Fatal Exception", MessageBoxButtons.OK);
     }
 }