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)); } }
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); } }
static void TaskManager_UnobservedTaskException(TaskExceptionInformation sender, UnhandledExceptionEventArgs e) { Console.WriteLine("Something went wrong with task: " + sender.Name + "\n" + e.ExceptionObject); }
static void TaskManager_UnobservedTaskException(TaskExceptionInformation info, UnhandledExceptionEventArgs e) { //TODO: log correctly!!!!!!!!! Console.WriteLine("An error happened with a scheduled task: " + e.ExceptionObject); }
public static void TaskManager_UnobservedTaskException(TaskExceptionInformation i, UnhandledExceptionEventArgs a) { //Log.Fatal("An error happened with a scheduled task: " + 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); }
/// <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); }
private static void TaskManagerUnobservedTaskException(TaskExceptionInformation sender, UnhandledExceptionEventArgs e) { Console.WriteLine("An error happened with a scheduled task: " + e.ExceptionObject); }