MCPcopy Create free account
hub / github.com/Effect-TS/effect / toError

Function toError

packages/platform/node-shared/src/NodeChildProcessSpawner.ts:48–51  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

46import * as NodeStream from "./NodeStream.ts"
47
48const toError = (error: unknown): Error =>
49 error instanceof globalThis.Error
50 ? error
51 : new globalThis.Error(String(error))
52
53const toPlatformError = (
54 method: string,

Callers 4

setupChildStdinFunction · 0.85
setupChildOutputStreamsFunction · 0.85
killProcessGroupFunction · 0.85

Calls 1

StringInterface · 0.50

Tested by

no test coverage detected