| 1 | export 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 | |
| 13 | export class UsageError extends CliError { |
| 14 | constructor(message: string, options?: ErrorOptions) { |
nothing calls this directly
no outgoing calls
no test coverage detected