Genel bakış
functionCore Runtime

thrown

Creates a thrown-exception runtime result.

Signature

tsSignature
export function thrown(error: unknown): Err<Thrown>;

Imports

tsImport
import { thrown } from "@/lib/flow/core/runtime";
import { thrown } from "@/lib/flow";

Parameters

error
unknown

Exception or thrown value.

Returns

A failed result containing `Thrown`.

Return type
Err<Thrown>
Thrown

Runtime error returned when user code throws.

type

Source

tsflow/core/runtime.ts:237-239
export function thrown(error: unknown): Err<Thrown> {
return err({ kind: "thrown", error });
}