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);
 }