Represents an error that occurred during task execution in the scheduler.

This interface provides detailed information about task failures, including the original error, the position of the failed task in the execution queue, and a reference to the task that caused the failure.

const errorHandler = (taskError: AcCmTaskError) => {
console.error(`Task "${taskError.task.name}" failed at position ${taskError.taskIndex}:`, taskError.error)
}
interface AcCmTaskError {
    error: unknown;
    task: AcCmTask<unknown, unknown>;
    taskIndex: number;
}

Properties

Properties

error: unknown

The error that was thrown during task execution.

This can be any type of error (Error, string, object, etc.) that was thrown by the task's run() method or during task execution.

task: AcCmTask<unknown, unknown>

The task instance that failed during execution.

Provides access to the task's name and other properties for detailed error reporting and debugging.

taskIndex: number

The zero-based index of the failed task in the task execution queue.

This indicates the position of the failed task relative to the start of the task chain, useful for debugging and error reporting.