"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _es6Error() { const data = _interopRequireDefault(require("es6-error")); _es6Error = function () { return data; }; return data; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const ERROR_PREFIX = 'Error: '; class CommandError extends _es6Error().default { constructor(code, message = '') { // If e.toString() was called to get `message` we don't want it to look // like "Error: Error:". if (message.startsWith(ERROR_PREFIX)) { message = message.substring(ERROR_PREFIX.length); } super(message || code); this.code = code; this.isCommandError = true; } } exports.default = CommandError; //# sourceMappingURL=__sourcemaps__/CommandError.js.map