コード例 #1
0
ファイル: ActionCenter.cs プロジェクト: Kittyfisto/Tailviewer
        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;
        }
コード例 #2
0
ファイル: ActionCenter.cs プロジェクト: Kittyfisto/Tailviewer
        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();
        }