MCPcopy Create free account
hub / github.com/cfworker/cfworker / errorHandler

Function errorHandler

packages/dev/src/cli/commands.js:23–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22/** @type {(err: any) => void} */
23const errorHandler = err => {
24 if (currentCommand) {
25 try {
26 currentCommand.dispose();
27 } catch {}
28 }
29 logger.error(err);
30 process.exit(1);
31};
32process.on('unhandledRejection', errorHandler);
33process.on('uncaughtException', errorHandler);
34

Callers

nothing calls this directly

Calls 2

disposeMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected