private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs) { if (_HandlingThreadEx) return; lock (_ExLock) { if (_HandlingThreadEx) return; _HandlingThreadEx = true; var reporter = new ExceptionReporter(unhandledExceptionEventArgs.ExceptionObject); reporter.ReportException(); } }
private void PublishTestBackgroundWorker_DoWork(object sender, DoWorkEventArgs e) { var testRun = (TestRun) e.Argument; try { testRun.Publish(); e.Result = null; } catch (Exception ex) { var reporter = new ExceptionReporter(ex); reporter.ReportException(); e.Result = "Could not publish test case: " + ex.Message; } }
private static SimpleSteps TryCreateSimpleSteps(TestEditInfo testInfo) { try { return SimpleSteps.Create(testInfo); } catch (Exception ex) { var exReporter = new ExceptionReporter(ex); exReporter.ReportException(); MessageBox.Show( "Could not load steps from test case: " + ex.Message, "Error Loading Test Case"); return null; } }