/// <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); }
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); }
private static void TaskManagerUnobservedTaskException(TaskExceptionInformation sender, UnhandledExceptionEventArgs e) { Console.WriteLine("An error happened with a scheduled task: " + e.ExceptionObject); }