MCPcopy Index your code
hub / github.com/callstack/agent-device / spawnRejectionError

Function spawnRejectionError

src/utils/exec.ts:598–608  ·  view source on GitHub ↗
(
  abort: CommandAbort,
  executable: string,
  cmd: string,
  args: string[],
  err: Error,
)

Source from the content-addressed store, hash-verified

596
597// Error to reject a spawned child's `error` event with: canceled if we aborted, else a spawn error.
598function spawnRejectionError(
599 abort: CommandAbort,
600 executable: string,
601 cmd: string,
602 args: string[],
603 err: Error,
604): AppError {
605 return abort.didAbort
606 ? createCommandCanceledError(executable, cmd, args)
607 : createSpawnError(executable, cmd, args, err);
608}
609
610// Failure (if any) for a spawned child's `close` event: canceled if we aborted, an exit error on
611// a non-zero code unless allowed, otherwise null (the command resolves successfully).

Callers 2

runSpawnedCommandFunction · 0.85
runCmdBackgroundFunction · 0.85

Calls 2

createSpawnErrorFunction · 0.85

Tested by

no test coverage detected