Skip to content

throwIfErr

function throwIfErr<T, E>(r): T;

Defined in: packages/engine/src/errors/Result.ts:105

Cross from Result-space back to throw-space, the sanctioned boundary adapter for callers (public API surface, older not-yet-migrated code, tests) that still want exception-based control flow. Throws r.error as-is (an EngineError is already a real Error subclass, so this needs no wrapping).

Type Parameter
T
E
ParameterType
rResult<T, E>

T