MCPcopy Create free account
hub / github.com/MicrosoftDocs/mcp / exitHandler

Function exitHandler

cli/src/index.ts:52–54  ·  view source on GitHub ↗
(error: CommanderError)

Source from the content-addressed store, hash-verified

50
51 const program = createProgram(context);
52 const exitHandler = (error: CommanderError): never => {
53 throw new CommanderError(error.exitCode === 0 ? 0 : 2, error.code, error.message);
54 };
55 program.exitOverride(exitHandler);
56 for (const sub of program.commands) {
57 sub.exitOverride(exitHandler);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected