123456789101112131415161718192021222324252627282930313233343536373839 |
- class CommanderError extends Error {
-
- constructor(exitCode, code, message) {
- super(message);
-
- Error.captureStackTrace(this, this.constructor);
- this.name = this.constructor.name;
- this.code = code;
- this.exitCode = exitCode;
- this.nestedError = undefined;
- }
- }
- class InvalidArgumentError extends CommanderError {
-
- constructor(message) {
- super(1, 'commander.invalidArgument', message);
-
- Error.captureStackTrace(this, this.constructor);
- this.name = this.constructor.name;
- }
- }
- exports.CommanderError = CommanderError;
- exports.InvalidArgumentError = InvalidArgumentError;
|