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

Class CliError

cli/src/utils/errors.ts:1–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1export class CliError extends Error {
2 readonly exitCode: number;
3 readonly quiet: boolean;
4
5 constructor(message: string, exitCode = 1, options?: ErrorOptions & { quiet?: boolean }) {
6 super(message, options);
7 this.name = new.target.name;
8 this.exitCode = exitCode;
9 this.quiet = options?.quiet ?? false;
10 }
11}
12
13export class UsageError extends CliError {
14 constructor(message: string, options?: ErrorOptions) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected