private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { FormError dlg = new FormError("Unhandled Exception", e.ExceptionObject as Exception); dlg.ShowDialog(); }
private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { FormError dlg = new FormError("Thread Error", e.Exception); dlg.ShowDialog(); }