MCPcopy Create free account
hub / github.com/6pac/SlickGrid / wrapError

Function wrapError

scripts/child-process.mjs:199–207  ·  view source on GitHub ↗

* Spawn a command asynchronously, _always_ inheriting stdio. * @param {import("tinyexec").Output} spawned

(spawned)

Source from the content-addressed store, hash-verified

197 * @param {import("tinyexec").Output} spawned
198 */
199function wrapError(spawned) {
200 return spawned.catch((err) => {
201 // ensure exit code is always a number
202 err.exitCode = getExitCode(err);
203
204 console.error('SPAWN PROCESS ERROR');
205 throw err;
206 });
207}

Callers 2

execAsyncPipedFunction · 0.85
spawnStreamingFunction · 0.85

Calls 1

getExitCodeFunction · 0.85

Tested by

no test coverage detected