예제 #1
0
        /// <summary>
        /// Fired when an exception is thrown.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnUnhandledException(object sender, global::Windows.UI.Xaml.UnhandledExceptionEventArgs e)
        {
            if (Debugger.IsAttached)
            {
                Debugger.Break();
            }

            if (App.BaconMan.UiSettingsMan.Developer_StopFatalCrashesAndReport)
            {
                // Warning this will report the error but leave us in a very bad state. Only use this for debugging.
                e.Handled = true;
                BaconMan.MessageMan.ShowMessageSimple("Fatal Crash", "The app tried to crash. \n\nMessage: " + e.Message + "\n\nException Msg: " + e.Exception.Message + "\n\nStack Trace:\n" + e.Exception.StackTrace);
            }
        }
예제 #2
0
 private void OnUnhandledException(object sender, global::Windows.UI.Xaml.UnhandledExceptionEventArgs e)
 {
     LogManager.GetCurrentClassLogger().Fatal(e.Exception);
 }
예제 #3
0
 /// <summary>Handles the UnhandledException event of the App control.</summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Windows.UI.Xaml.UnhandledExceptionEventArgs"/> instance containing the event data.</param>
 private void App_UnhandledException(object sender, global::Windows.UI.Xaml.UnhandledExceptionEventArgs e)
 {
     _logger.LogCritical(e.Exception, "UnhandledException occurred");
 }