MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / toError

Function toError

packages/kernel/runtime-quickjs/src/index.ts:47–48  ·  view source on GitHub ↗
(cause: unknown)

Source from the content-addressed store, hash-verified

45const EXECUTION_FILENAME = "executor-quickjs-runtime.js";
46
47const toError = (cause: unknown): Error =>
48 cause instanceof Error ? cause : new Error(String(cause));
49
50// Defect surfaced to the sandbox when a tool dispatch reaches the
51// reject path. Two sources reach here:

Callers 3

toErrorMessageFunction · 0.70
serializeJsonFunction · 0.70
drainJobsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected