private void MyApplication_UnhandledException(object sender, Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs e)
 {
     if (e.Exception != null)
     {
         ProgramError.DefaultInstance.DataError = e.Exception;
         ProgramError.DefaultInstance.ShowDialog();
     }
 }
Пример #2
0
 private void OnErrorMessage(object sender, Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs e)
 {
     if (!Debugger.IsAttached)
     {
         var exception = e.Exception.Demystify();
         var frm       = new Form_ErrorDialog();
         frm.ErrorText = exception.Message + Constants.vbNewLine + Constants.vbNewLine + exception.StackTrace;
         frm.ShowDialog();
         e.ExitApplication = frm.ExitApplicaiton;
     }
 }
Пример #3
0
 private static void App_UnhandledException(object sender,
                                            Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs
                                            e)
 {
     e.ExitApplication = false;
 }
Пример #4
0
 static void Application_UnhandledException(object sender, Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs e)
 {
     UIHelper.HandleUIException(e.Exception);
 }