MCPcopy Create free account
hub / github.com/appium/appium / execWithErrorHandling

Function execWithErrorHandling

packages/docutils/lib/utils/process.ts:36–44  ·  view source on GitHub ↗
(cmd: string, args?: string[], opts?: TeenProcessExecOptions)

Source from the content-addressed store, hash-verified

34 * Wraps {@linkcode exec} with error handling that appends stderr to the thrown error message.
35 */
36export async function execWithErrorHandling(cmd: string, args?: string[], opts?: TeenProcessExecOptions) {
37 try {
38 return await exec(cmd, args, opts);
39 } catch (err) {
40 const execErr = err as ExecError;
41 execErr.message = execErr.stderr ? `${execErr.message}\nCommand error:\n${execErr.stderr}` : execErr.message;
42 throw execErr;
43 }
44}

Callers 2

doDeployFunction · 0.85
doBuildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected