Exemplo n.º 1
0
        private void CurrentDispatcher_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs args)
        {
            var excArgs = new UnhandledExceptionsEventArgs(args.Exception, UnhandledExceptionSource.CurrentDispatcher);

            OnUnhandledException(excArgs);
            args.Handled = excArgs.Handled;
        }
 private void TaskScheduler_UnobservedTaskException (object sender, UnobservedTaskExceptionEventArgs args)
 {
     args.Exception.Flatten();
     var excArgs = new UnhandledExceptionsEventArgs(args.Exception.InnerExceptions, UnhandledExceptionSource.TaskScheduler);
     OnUnhandledException(excArgs);
     if (excArgs.Handled)
         args.SetObserved();
 }
Exemplo n.º 3
0
        private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs args)
        {
            args.Exception.Flatten();
            var excArgs = new UnhandledExceptionsEventArgs(args.Exception.InnerExceptions, UnhandledExceptionSource.TaskScheduler);

            OnUnhandledException(excArgs);
            if (excArgs.Handled)
            {
                args.SetObserved();
            }
        }
Exemplo n.º 4
0
 protected virtual void OnUnhandledException(UnhandledExceptionsEventArgs args)
 {
     UnhandledException.NullableInvoke(this, args);
 }
Exemplo n.º 5
0
        private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs args)
        {
            var excArgs = new UnhandledExceptionsEventArgs((Exception)args.ExceptionObject, UnhandledExceptionSource.CurrentDomain, false);

            OnUnhandledException(excArgs);
        }
 protected virtual void OnUnhandledException (UnhandledExceptionsEventArgs args)
 {
     UnhandledException.NullableInvoke(this, args);
 }
 private void CurrentDomain_UnhandledException (object sender, UnhandledExceptionEventArgs args)
 {
     var excArgs = new UnhandledExceptionsEventArgs((Exception)args.ExceptionObject, UnhandledExceptionSource.CurrentDomain, false);
     OnUnhandledException(excArgs);
 }
 private void CurrentDispatcher_DispatcherUnhandledException (object sender, DispatcherUnhandledExceptionEventArgs args)
 {
     var excArgs = new UnhandledExceptionsEventArgs(args.Exception, UnhandledExceptionSource.CurrentDispatcher);
     OnUnhandledException(excArgs);
     args.Handled = excArgs.Handled;
 }