Beispiel #1
0
        private static void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
            if (e.Handled)
            {
                return;
            }

            CrashReporter.ShowCrashReport(e.Exception);

            e.Handled = true;
        }
        /// <summary>
        ///     Opens crash report window properly
        /// </summary>
        /// <param name="ex">Exception</param>
        public static void ShowCrashReport(Exception ex)
        {
            // Are we in the UI thread?
            if (Thread.CurrentThread != Application.Current.Dispatcher.Thread)
            {
                Application.Current.Dispatcher.Invoke(new Action <Exception>(ShowCrashReport), ex);
                return;
            }

            var crashRep = new CrashReporter(ex);

            crashRep.Show();
        }
Beispiel #3
0
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     CrashReporter.ShowCrashReport(e.ExceptionObject as Exception);
 }