Exemplo n.º 1
0
 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     if (saveLog(e.ExceptionObject as Exception))
     {
         var crash = new formCrash((e.ExceptionObject as Exception).Message + Environment.NewLine + (e.ExceptionObject as Exception).StackTrace, "AA2Install crash " + DateTime.Now.ToString("d-M-yyyy hh-mm-ss") + ".dmp");
         crash.ShowDialog();
     }
     else
     {
         var crash = new formCrash((e.ExceptionObject as Exception).Message + Environment.NewLine + (e.ExceptionObject as Exception).StackTrace);
         crash.ShowDialog();
     }
     Application.Exit();
 }
Exemplo n.º 2
0
 static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
 {
     if (saveLog(e.Exception))
     {
         var crash = new formCrash(e.Exception.Message + Environment.NewLine + e.Exception.StackTrace, "AA2Install crash " + DateTime.Now.ToString("d-M-yyyy hh-mm-ss") + ".dmp");
         crash.ShowDialog();
     }
     else
     {
         var crash = new formCrash(e.Exception.Message + Environment.NewLine + e.Exception.StackTrace);
         crash.ShowDialog();
     }
     Application.Exit();
 }