internal static void PublishUnobservedTaskException(Task sender, UnobservedTaskExceptionEventArgs ueea)
 {
     // Lock this logic to prevent just-unregistered handlers from being called.
     lock (_unobservedTaskExceptionLockObject)
     {
         // Since we are under lock, it is technically no longer necessary
         // to make a copy.  It is done here for convenience.
         var handler = _unobservedTaskException;
         if (handler != null)
         {
             handler(sender, ueea);
         }
     }
 }
Ejemplo n.º 2
0
 void DotNet40_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     // On .NET 4.0, an unobserved exception in a task terminates the process unless we mark it as observed
     e.SetObserved();
 }
Ejemplo n.º 3
0
 private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     _analyticsService.Track(e.Exception, true);
     Log.Error(e.Exception, "Uncaught Exception");
     Log.Error($"Terminating");
 }
Ejemplo n.º 4
0
 static void TaskSchedulerUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     Console.WriteLine(e.Exception.Message);
 }
        private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
        {
            var exception = new Exception("TaskSchedulerOnUnobservedTaskException", e.Exception);

            LogUnhandledException(exception);
        }
Ejemplo n.º 6
0
 static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     frmUnhandledException.HandleExceptionNoRestart(null, e.Exception);
 }
Ejemplo n.º 7
0
 private static void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     // Prevents the process from crashing
     e.SetObserved();
     Log.Error(e.Exception, "UnobservedTaskException");
 }
Ejemplo n.º 8
0
 private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs unobservedTaskExceptionEventArgs)
 {
     SendReport(unobservedTaskExceptionEventArgs.Exception);
     Environment.Exit(0);
 }
Ejemplo n.º 9
0
 void DotNet40_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     // On .NET 4.0, an unobserved exception in a task terminates the process unless we mark it as observed
     e.SetObserved();
 }
Ejemplo n.º 10
0
 private void OnTaskSchedulerUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     Logger.Error("OnTaskSchedulerUnobservedTaskException", e.Exception);
     Debugger.Break();
 }
Ejemplo n.º 11
0
 private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs unobservedTaskExceptionEventArgs)
 {
     restartApp();
     //var newExc = new System.Exception("TaskSchedulerOnUnobservedTaskException", unobservedTaskExceptionEventArgs.Exception);
     //LogUnhandledException(newExc);
 }
Ejemplo n.º 12
0
 //异常处理
 private void ExceptionHandling(object seader, UnobservedTaskExceptionEventArgs eventArgs)
 {
     Log.Error("Task线程内未捕获异常:");
     Log.Add(eventArgs.Exception);
 }
Ejemplo n.º 13
0
 static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     Console.WriteLine("又出错了");
 }
Ejemplo n.º 14
0
        private static void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs exEventArgs)
        {
            var newExc = new Exception("TaskSchedulerOnUnobservedTaskException", exEventArgs.Exception);

            LogUnhandledException(newExc);
        }
Ejemplo n.º 15
0
 private static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     Console.WriteLine(e.ToString());
 }
Ejemplo n.º 16
0
	static void TaskScheduler_UnobservedTaskException (object sender, UnobservedTaskExceptionEventArgs e)
	{
		unobserved = true;
		Console.WriteLine ("unobserved");
	}
Ejemplo n.º 17
0
 private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 18
0
 // Occurs when an exception is not handled on a background thread.
 // ie. A task is fired and forgotten Task.Run(() => {...})
 private static void OnUnobservedException(object sender, UnobservedTaskExceptionEventArgs e) => AppUnhandledException(e.Exception);
Ejemplo n.º 19
0
 void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     ProcessError(e.Exception);
     ProcessError();
     e.SetObserved();
 }
Ejemplo n.º 20
0
        private static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
        {
            Debug.WriteLine($"Unhandled task exception: {e.Exception.InnerExceptions.Aggregate("", (a, b) => $"{a}\n{b}")}");

            e.SetObserved();
        }
Ejemplo n.º 21
0
        private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
        {
            var ex = e.Exception.InnerException ?? e.Exception; // inner exception contains better info for unobserved tasks

            _tracker.SendException(ex.ToString(), false);
        }
 private static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     Console.WriteLine("Unobserved Exception: ", e.Exception);
 }
Ejemplo n.º 23
0
 private void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     OnException(sender, e.Exception);
 }
Ejemplo n.º 24
0
 private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     HandleException(e.Exception);
 }
Ejemplo n.º 25
0
 private static void TaskScheduler_UnobservedTaskException(object?sender, UnobservedTaskExceptionEventArgs e)
 {
     Logger.LogDebug(e.Exception);
 }
Ejemplo n.º 26
0
 private void TaskSchedulerUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     unobservedTaskException = e.Exception;
 }
Ejemplo n.º 27
0
 void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     //task线程内未处理捕获
     MessageBox.Show("捕获线程内未处理异常:" + e.Exception.Message);
     e.SetObserved();//设置该异常已察觉(这样处理后就不会引起程序崩溃)
 }
Ejemplo n.º 28
0
 /// <summary>
 /// Observe unhandled exceptions
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     e.SetObserved();
     CurrentDomainUnhandledException(sender, new UnhandledExceptionEventArgs(e.Exception, false));
 }
Ejemplo n.º 29
0
 private static void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs unobservedTaskExceptionEventArgs)
 {
     ExceptionHandler.LogException(unobservedTaskExceptionEventArgs.Exception);
     unobservedTaskExceptionEventArgs.SetObserved();
 }
Ejemplo n.º 30
0
 private static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     e.SetObserved();
     Logger.Write(e.Exception.Message);
     HockeyClient.Current.TrackException(e.Exception);
 }
Ejemplo n.º 31
0
 static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     HandleException(e.Exception, "TaskScheduler.UnobservedTaskException");
 }
 private void TaskSchedulerOnUnobservedTaskException(object?sender, UnobservedTaskExceptionEventArgs args)
 {
     HandleException(args.Exception !.Flatten().InnerException !);
 }
Ejemplo n.º 33
0
 private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     BLogger.Logger.Error(string.Format("Task ({0}) terminating...", e.Exception.Source), e.Exception);
 }
Ejemplo n.º 34
0
        private static void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs unobservedTaskExceptionEventArgs)
        {
            var newExc = new Exception(nameof(TaskSchedulerOnUnobservedTaskException), unobservedTaskExceptionEventArgs.Exception);

            DataStore.CN.NotifyException("TaskSchedulerOnUnobservedTaskException", newExc);
        }