ErrorCode
Defined in: src/enums/ErrorCode.ts:5
Enumerates the machine-readable codes carried by a TaskTimerError on
its code property, so failures can be branched on without string-matching.
Enumeration Members
Section titled “Enumeration Members”NO_TASK_PROVIDED
Section titled “NO_TASK_PROVIDED”NO_TASK_PROVIDED:
"NO_TASK_PROVIDED"
Defined in: src/enums/ErrorCode.ts:9
TaskTimer.add was called without a task, task options or a callback.
TASK_ID_REQUIRED
Section titled “TASK_ID_REQUIRED”TASK_ID_REQUIRED:
"TASK_ID_REQUIRED"
Defined in: src/enums/ErrorCode.ts:13
A task was constructed (or reset) without a unique id.
CALLBACK_REQUIRED
Section titled “CALLBACK_REQUIRED”CALLBACK_REQUIRED:
"CALLBACK_REQUIRED"
Defined in: src/enums/ErrorCode.ts:17
A task was constructed without a callback function.
DUPLICATE_TASK_ID
Section titled “DUPLICATE_TASK_ID”DUPLICATE_TASK_ID:
"DUPLICATE_TASK_ID"
Defined in: src/enums/ErrorCode.ts:21
A task with the same id already exists on the timer.
NO_SUCH_TASK
Section titled “NO_SUCH_TASK”NO_SUCH_TASK:
"NO_SUCH_TASK"
Defined in: src/enums/ErrorCode.ts:25
TaskTimer.remove was given an id that no task matches.
INVALID_DATE_RANGE
Section titled “INVALID_DATE_RANGE”INVALID_DATE_RANGE:
"INVALID_DATE_RANGE"
Defined in: src/enums/ErrorCode.ts:29
A task’s startDate is the same as or after its stopDate.
CANNOT_CHANGE_ID
Section titled “CANNOT_CHANGE_ID”CANNOT_CHANGE_ID:
"CANNOT_CHANGE_ID"
Defined in: src/enums/ErrorCode.ts:33
Task.reset was asked to change the task id, which is immutable.
TASK_ERROR
Section titled “TASK_ERROR”TASK_ERROR:
"TASK_ERROR"
Defined in: src/enums/ErrorCode.ts:39
A task’s callback threw or rejected and the error went unhandled (no
taskError listener) while the timer’s silentErrors is false. The
original error is on cause.