API reference › @evolu/common › Task › PanicAbortReason

Defined in: packages/common/src/Task.ts:2036

Abort reason recorded when a defect panics the root Run.

A defect is a thrown or rejected value other than AbortError or a SuppressedError nesting only AbortErrors. Recoverable domain errors belong in Result. Bugs and unrecoverable failures, such as storage engine errors the Task cannot usefully handle, may throw or reject.

Run.onEvent handler defects are different: event handlers are monitoring code, so their defects are reported globally but do not panic the root Run.

When Run observes a defect, it aborts the root Run and starts disposal immediately. This prevents later Tasks from starting after the defect. A Fiber rejects with AbortError whose reason is PanicAbortReason; an AbortableFiber returns that AbortError as an Err.

Extends

Indexable

[key: string]: unknown

Properties

defect

readonly defect: unknown;

Defined in: packages/common/src/Task.ts:2038


type

readonly type: "PanicAbortReason";

Defined in: packages/common/src/Task.ts:2037

Overrides

UnknownError.type