private void MyApplication_UnhandledException(object sender, Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs e) { if (e.Exception != null) { ProgramError.DefaultInstance.DataError = e.Exception; ProgramError.DefaultInstance.ShowDialog(); } }
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; } }
private static void App_UnhandledException(object sender, Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs e) { e.ExitApplication = false; }
static void Application_UnhandledException(object sender, Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs e) { UIHelper.HandleUIException(e.Exception); }