static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { try { if (e.Exception.Message == "NoDriver calling waveInPrepareHeader") { //USB audio unplugged (typically the cause) - no other way to catch this exception in the volume level control due to limitation in NAudio } else { if (iSpyServer.iSpyServer.Default.Enable_Error_Reporting && _ReportedExceptionCount == 0 && e.Exception != null && e.Exception.Message != null && e.Exception.Message.ToString().Trim() != "") { if (_ER == null) { _ER = new ErrorReporting(); _ER.UnhandledException = e.Exception; _ER.ShowDialog(); _ER.Dispose(); _ER = null; _ReportedExceptionCount++; } } } MainForm.LogExceptionToFile(e.Exception); } catch (Exception ex2) { MainForm.LogExceptionToFile(ex2); } }
public static void ConstructorTest() { var e = new ThreadExceptionEventArgs(null); Assert.Null(e.Exception); var ex = new Exception(); e = new ThreadExceptionEventArgs(ex); Assert.Same(ex, e.Exception); }
public static void HandleThreadException(object sender, ThreadExceptionEventArgs e) { string message = e.Exception.Message; string tempfile = Path.Combine(Path.GetTempPath(),"PhysicsIllustrator.txt"); string text = String.Format("The following error occurred:\n\n{0}\n\nDetails will be saved to '{1}'.",message,tempfile); MessageBox.Show(text,Application.ProductName,MessageBoxButtons.OK,MessageBoxIcon.Stop); using (TextWriter tw = File.CreateText(tempfile)) { tw.WriteLine(e.Exception.ToString()); } System.Diagnostics.Process.Start(tempfile); }
private static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e) { try { if (e.Exception.Message.IndexOf("NoDriver")!=-1) { //USB audio plugged/ unplugged (typically the cause) - no other way to catch this exception in the volume level control due to limitation in NAudio } else { if (MainForm.Conf.Enable_Error_Reporting && _reportedExceptionCount == 0 && e.Exception != null && e.Exception.Message.Trim() != "") { if (_er == null) { _er = new ErrorReportingForm {UnhandledException = e.Exception}; _er.ShowDialog(); _er.Dispose(); _er = null; _reportedExceptionCount++; } } } Log.Error("", e.Exception); } catch (Exception ex2) { try { Log.Error("", ex2); } catch { } } }
static void VoucherPrinter_Error(object sender, ThreadExceptionEventArgs e) { Debug.Fail(e.Exception.Message, e.Exception.ToString()); }
public static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e) { Engine.OnUnhandledException(e.Exception); }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { new FrmDisplayException(e.Exception).Show(); }
private void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { // This is here to prevent unhandled exceptions from appearing in a message box. }
private static void ApplicationOnThreadException(object sender, ThreadExceptionEventArgs e) { Log.Fatal(e.Exception); }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { Log.WriteError(e.Exception.Message, e.Exception); }
private void OnApplicationThreadException(object sender, ThreadExceptionEventArgs e) { ErrorDispatcher.DispatchFatalError(e.Exception); }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { MessageBox.Show(null, e.Exception.ToString(), "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error); }
void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { NotifyOfUnhandledException(e.Exception); }
private static void applicationThreadException( object sender, ThreadExceptionEventArgs e) { doHandleException(e.Exception); }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// threadexceptioneventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this ThreadExceptionEventHandler threadexceptioneventhandler, Object sender, ThreadExceptionEventArgs e, AsyncCallback callback) { if (threadexceptioneventhandler == null) { throw new ArgumentNullException("threadexceptioneventhandler"); } return(threadexceptioneventhandler.BeginInvoke(sender, e, callback, null)); }
/// <summary> /// Handles untrapper thread exception. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event parameter.</param> static void UnhandledThreadException(object sender, ThreadExceptionEventArgs e) { ExceptionWindow.Show(e.Exception); }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { JLog.Instance.Error(e.Exception.Message); }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { write_dump(e.Exception.ToString()); }
public void ApplicationThreadException(object sender, ThreadExceptionEventArgs e) { ExceptionReporter reporter = new ExceptionReporter(); reporter.Show(e.Exception); }
private static void UIThread_UnhandledException(object sender, ThreadExceptionEventArgs e) { HandleException(e.Exception); }
static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { Utils.SaveLog("Application_ThreadException", e.Exception); }
private static void UIThreadException(object sender, ThreadExceptionEventArgs t) { MessageBox.Show(t.Exception.ToString(), "UIThreadException"); Application.Exit(); }
public static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { AppData.ErrLog.WriteException(e.Exception, CommonPhrases.UnhandledException); ScadaUiUtils.ShowError(CommonPhrases.UnhandledException + ":\r\n" + e.Exception.Message); }
void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { LogException(e.Exception, true); }
static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { MessageBox.Show(e.Exception.Message, "Unhandled Thread Exception"); // here you can log the exception ... }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { OnError(e.Exception); }
static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { Console.WriteLine("Unhandled Exception"); Console.WriteLine(e.Exception.ToString()); }
private static void OnApplicationThreadException(object sender, ThreadExceptionEventArgs e) { OnException(e.Exception); }
void OnUnhandledThreadException(object sender, ThreadExceptionEventArgs e) { var unhandledExceptionArgs = new UnhandledExceptionEventArgs(e.Exception, true); Callback.OnUnhandledException(Widget, unhandledExceptionArgs); }
static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { Log4Neter.Error("未捕获异常", e.Exception); }
private void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { HandleAllUnknownErrors(sender.ToString(), e.Exception); }
public static void ExceptionHandler(object sender, ThreadExceptionEventArgs e) { CrashReporter.Instance.Write(e.Exception); Environment.Exit(1); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> // ReSharper disable UnusedMember.Local // ReSharper disable UnusedParameter.Local private static void OnThreadException(object sender, ThreadExceptionEventArgs e) // ReSharper restore UnusedParameter.Local // ReSharper restore UnusedMember.Local { var result = DialogResult.Abort; try { result = MessageBox.Show(string.Format("{0}\n\n{1}{2}", Resources.UnhandledException, e.Exception.Message, e.Exception.StackTrace), Resources.ApplicationError, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop); } finally { if (result == DialogResult.Abort) { Application.Exit(); } } }
public void ApplicationThreadException(object sender, ThreadExceptionEventArgs e) { //HelpMsgBox._showSystemErrorMessage("Xin lỗi về sự bất tiện này. Vui lòng khởi động lại ứng dụng.\n Nếu vẫn xãy ra lỗi này vui lòng liên hệ đến Công ty PROTOCOL.", true); //HelpMsgBox.ShowNotificationMessage("Xin lỗi về sự bất tiện này. Vui lòng khởi động lại ứng dụng.\n Nếu vẫn xãy ra lỗi này vui lòng liên hệ đến Công ty PROTOCOL."); //MessageBox.Show(e.Exception.Message, "An exception occurred:", MessageBoxButtons.OK, MessageBoxIcon.Error); PLException.AddException(new PLException(e.Exception)); frmFWUserError frm = new frmFWUserError(e); frm.ShowDialog(); }
static void OnThreadException (object sender, ThreadExceptionEventArgs e) { _events.Add ("ThreadException:" + e.Exception.Message + " | " + e.Exception.GetType ().FullName); }
private static void Application_Errors(object sender, ThreadExceptionEventArgs t) { Log.Error(t.Exception.Message); Log.Error(t.Exception.StackTrace); }
private void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { HandleException(e.Exception, nameof(Application_ThreadException)); }
private static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e) { try { if (!string.IsNullOrEmpty(e?.Exception?.Message) && e.Exception.Message.IndexOf("NoDriver", StringComparison.Ordinal)!=-1) { //USB audio plugged/ unplugged (typically the cause) - no other way to catch this exception in the volume level control due to limitation in NAudio } if (e!=null) Logger.LogExceptionToFile(e.Exception); } catch (Exception ex2) { try { Logger.LogExceptionToFile(ex2); } catch { } } }
private static void onThreadException(object sender, ThreadExceptionEventArgs e) { mfail(e.Exception, true); }
/// <summary> /// Catches all ui errors and writes them to the log as a fatal /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public static void ThreadException(object sender, ThreadExceptionEventArgs e) { Exception exception = e.Exception; WriteLine(exception.Message + Environment.NewLine + exception.StackTrace, logTypes.FATAL); }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { HandleUnhandledException(e.Exception, false); }