private void SynchronizationContext_UnhandledException(object sender, AysncUnhandledExceptionEventArgs e) { e.Handled = true; // await new MessageDialog("Synchronization Context Unhandled Exception:\r\n" + e.Exception.Message) //.ShowAsync(); }
private bool HandleException(Exception exception) { if (UnhandledException == null) { return(false); } var exWrapper = new AysncUnhandledExceptionEventArgs { Exception = exception }; UnhandledException(this, exWrapper); #if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION if (System.Diagnostics.Debugger.IsAttached) { System.Diagnostics.Debugger.Break(); } #endif return(exWrapper.Handled); }