/// <summary> /// Raises the <see cref="TaskException" /> event. /// </summary> /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param> protected virtual void OnTaskException(ScheduledTaskExceptionEventArgs e) { EventHandler <ScheduledTaskExceptionEventArgs> handler; handler = this.TaskException; if (handler != null) { handler(this, e); } }
private void SchedulerTaskExceptionHandler(object sender, ScheduledTaskExceptionEventArgs e) { this.Log(e.Exception.ToString()); this.OnTaskException(e); }
private void JobManagerTaskExceptionHandler(object sender, ScheduledTaskExceptionEventArgs e) { this.WriteLog("Task Failed: {0}\n{1}", e.Task.Name, e.Exception.Message); this.TrayIcon.ShowBalloonTip(10000, e.Task.Name, e.Exception.GetBaseException().Message, ToolTipIcon.Error); }