MCPcopy Index your code
hub / github.com/anomalyco/opencode / toPlatformError

Function toPlatformError

packages/core/src/cross-spawn-spawner.ts:79–95  ·  view source on GitHub ↗
(
  method: string,
  err: NodeJS.ErrnoException,
  command: ChildProcess.Command,
)

Source from the content-addressed store, hash-verified

77}
78
79const toPlatformError = (
80 method: string,
81 err: NodeJS.ErrnoException,
82 command: ChildProcess.Command,
83): PlatformError.PlatformError => {
84 const cmd = flatten(command)
85 .commands.map((x) => `${x.command} ${x.args.join(" ")}`)
86 .join(" | ")
87 return PlatformError.systemError({
88 _tag: toTag(err),
89 module: "ChildProcess",
90 method,
91 pathOrDescriptor: cmd,
92 syscall: err.syscall,
93 cause: err,
94 })
95}
96
97type ExitSignal = Deferred.Deferred<readonly [code: number | null, signal: NodeJS.Signals | null]>
98

Callers 6

setupStdinFunction · 0.85
setupOutputFunction · 0.85
spawnFunction · 0.85
killGroupFunction · 0.85
killOneFunction · 0.85

Calls 2

toTagFunction · 0.85
flattenFunction · 0.70

Tested by

no test coverage detected