API reference@evolu/commonTask › PanicAbortReason

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

A root-level abort caused by a defect.

Panic is a root-level abort caused by a defect: a thrown exception or rejected Promise. Recoverable domain errors belong in Result. Unexpected or unrecoverable conditions, such as storage engine errors the Task cannot usefully handle, may throw or reject. AbortError is abort control flow, not a defect.

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:2022


type

readonly type: "PanicAbortReason";

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

Overrides

UnknownError.type