コード例 #1
0
ファイル: TaskManager.cs プロジェクト: nnazim/FluentScheduler
        private static void RaiseUnobservedTaskException(Schedule schedule, Task t)
        {
            var handler = UnobservedTaskException;

            if (handler != null && t.Exception != null)
            {
                var info = new TaskExceptionInformation
                {
                    Name = schedule.Name,
                    Task = t
                };
                handler(info, new FluentScheduler.UnhandledExceptionEventArgs(t.Exception.InnerException, true));
            }
        }
コード例 #2
0
        private void TaskManager_UnobservedTaskException(TaskExceptionInformation sender, UnhandledExceptionEventArgs e)
        {
            var template = "An error happened with a scheduled task";

            var exception = e.ExceptionObject as Exception;

            if (exception != null)
            {
                Log.Fatal(exception, template);
            }
            else
            {
                Log.Fatal(template + ": " + e.ExceptionObject);
            }
        }
コード例 #3
0
 static void TaskManager_UnobservedTaskException(TaskExceptionInformation sender, UnhandledExceptionEventArgs e)
 {
     Console.WriteLine("Something went wrong with task: " + sender.Name + "\n" + e.ExceptionObject);
 }
コード例 #4
0
 static void TaskManager_UnobservedTaskException(TaskExceptionInformation info, UnhandledExceptionEventArgs e)
 {
     //TODO: log correctly!!!!!!!!!
     Console.WriteLine("An error happened with a scheduled task: " + e.ExceptionObject);
 }
コード例 #5
0
 public static void TaskManager_UnobservedTaskException(TaskExceptionInformation i, UnhandledExceptionEventArgs a)
 {
     //Log.Fatal("An error happened with a scheduled task: " + e.ExceptionObject);
 }
コード例 #6
0
        static void TaskManager_UnobservedTaskException(TaskExceptionInformation sender, UnhandledExceptionEventArgs e)
        {
            var log = LogManager.GetLogger(typeof(MvcApplication));

            log.Fatal("An error happened with a scheduled task: " + sender.Name + "\n" + e.ExceptionObject);
        }
コード例 #7
0
 /// <summary>
 /// Any exceptions that occur in the background task threads are caught here. We should probably log.
 /// </summary>
 private static void TaskManager_UnobservedTaskException(TaskExceptionInformation sender, UnhandledExceptionEventArgs e)
 {
     Debug.WriteLine("TASK ERROR: " + e.ExceptionObject);
 }
コード例 #8
0
ファイル: HardwareMonitor.cs プロジェクト: radtek/NZBDash
 private static void TaskManagerUnobservedTaskException(TaskExceptionInformation sender, UnhandledExceptionEventArgs e)
 {
     Console.WriteLine("An error happened with a scheduled task: " + e.ExceptionObject);
 }