This question is locked. New answers and comments are not allowed.
I am using an ExitException within my application to quit it easy if the user has chosen this option.
Unfotunately I can not get it work with RadDiagnostics and I do not know why.
The app will not be closed after ExitException has occured.
This works well at the moment.
Unfotunately I can not get it work with RadDiagnostics and I do not know why.
// InitializeradDiagnostics = new RadDiagnostics(); radDiagnostics.EmailTo = AppResources.SupportEmail; radDiagnostics.ApplicationName = AppResources.AppTitle; radDiagnostics.ApplicationVersion = AppResources.Version; radDiagnostics.EmailSubject = AppResources.AppTitle + " " + AppResources.Version + " " + AppResources.Error; radDiagnostics.HandleUnhandledException = true; radDiagnostics.Init(); radDiagnostics.ExceptionOccurred += new EventHandler<ExceptionOccurredEventArgs>(RadDiagnostics_ExceptionOccurred);// Handleprivate void RadDiagnostics_ExceptionOccurred(object sender, ExceptionOccurredEventArgs e) { if (e.Exception is ExitException == true) { e.Cancel = true; e.Handled = false; return; } else { e.Handled = true; } }The app will not be closed after ExitException has occured.
// By nowprivate void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { if (e.ExceptionObject is ExitException) return; // Handle error if it is not an ExitException // Create Mail for example e.Handled = true; }This works well at the moment.