emitLayoutError()
Emit a layout error through the graph protocol.
Import
Section titled “Import”import { emitLayoutError } from "@graphrefly/ts/solutions/reactive-layout";Signature
Section titled “Signature”function emitLayoutError( ctx: Ctx, error: unknown, fallback: string,): voidParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
ctx | Ctx | Current fn context. |
error | unknown | Error payload to normalize. |
fallback | string | Fallback message used for invalid payloads. |
Returns
Section titled “Returns”Nothing; the error is emitted via ctx.down.
Example
Section titled “Example”emitLayoutError(ctx, new Error("bad layout"), "layout failed");Source
Section titled “Source”packages/ts/src/solutions/reactive-layout/utils.ts