protected override void OnReportException(ReportExceptionEventArgs e)
        {
            if (e.Exception.Message.StartsWith("*NO_UI*"))
            {
                ExceptionReportingForm.NoUi = true;
            }
            ExceptionReportingForm form = new ExceptionReportingForm(this, e);

            form.ShowDialog();
        }
Exemple #2
0
        protected override void OnReportException(ReportExceptionEventArgs e)
        {
            Thread exceptionUiThread = new Thread(() =>
            {
                // Starts our exception dialog and handle all events (must be on STA thread)
                ExceptionReportingForm form = new ExceptionReportingForm(this, e);
                form.ShowDialog();
            });

            exceptionUiThread.SetApartmentState(ApartmentState.STA);
            exceptionUiThread.Start();
            exceptionUiThread.Join();
        }