static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { Exception exc = e.ExceptionObject as Exception; Dialogs.FatalException f = new Aptima.Asim.DDD.Client.Dialogs.FatalException(); f.Message = exc.Message; f.ShowDialog(); Environment.Exit(1); }
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { Dialogs.FatalException f = new Aptima.Asim.DDD.Client.Dialogs.FatalException(); f.Message = e.Exception.Message; f.ShowDialog(); Environment.Exit(1); }