Skip to content
PACKAGES

emitLayoutError()

Emit a layout error through the graph protocol.

import { emitLayoutError } from "@graphrefly/ts/solutions/reactive-layout";
function emitLayoutError(
ctx: Ctx,
error: unknown,
fallback: string,
): void
ParameterTypeDescription
ctxCtxCurrent fn context.
errorunknownError payload to normalize.
fallbackstringFallback message used for invalid payloads.

Nothing; the error is emitted via ctx.down.

emitLayoutError(ctx, new Error("bad layout"), "layout failed");

packages/ts/src/solutions/reactive-layout/utils.ts