MCPcopy Create free account
hub / github.com/Snapchat/Valdi / rejectWithError

Function rejectWithError

valdi/vscode_debugger/src/common/processUtils.ts:49–58  ·  view source on GitHub ↗
(code?: number, innerError?: Error)

Source from the content-addressed store, hash-verified

47 process.stdout.on('data', chunk => stdout.push(chunk));
48
49 const rejectWithError = (code?: number, innerError?: Error) =>
50 reject(
51 new ChildProcessError(
52 command,
53 Buffer.concat(stderr).toString(),
54 Buffer.concat(stdout).toString(),
55 code,
56 innerError,
57 ),
58 );
59
60 process.on('error', err => rejectWithError(undefined, err));
61 process.on('close', code =>

Callers 1

spawnAsyncFunction · 0.85

Calls 3

rejectFunction · 0.85
toStringMethod · 0.65
concatMethod · 0.45

Tested by

no test coverage detected