public void ReportUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs args) { Exception exception = args.Exception; Log.ErrorFormat("Caught unexpected exception on dispatcher: {0}", exception); var notification = new UnhandledException(exception); Add(notification); args.Handled = true; }
public void ReportUnhandledException(object sender, UnobservedTaskExceptionEventArgs args) { Exception exception = args.Exception; Log.ErrorFormat("Caught unexpected exception on task: {0}", exception); var notification = new UnhandledException(exception); Add(notification); args.SetObserved(); }