static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { var frmErrorReport = new FrmErrorReport(); frmErrorReport.tbReport.Text = ExceptionPrinter.PrintException((Exception)e.ExceptionObject); frmErrorReport.ShowDialog(); }
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { var frmErrorReport = new FrmErrorReport(); frmErrorReport.tbReport.Text = ExceptionPrinter.PrintException(e.Exception); frmErrorReport.ShowDialog(); }