Skip to main content

StaticJsTaskError

Base class for all task lifecycle errors.

Import

import { StaticJsTaskError } from "@suntime-js/core";

Extends

ErrorStaticJsTaskError

When thrown

Thrown (or a subclass is thrown) by task.next(), task.abort(), and task.throw() when they are called in an invalid state. Catch StaticJsTaskError when you want to handle any task lifecycle error regardless of its specific cause.

Known subclasses: StaticJsTaskCompletedError, StaticJsTaskAbortedError.