@mongosh/errors
Advanced tools
Comparing version 0.2.2 to 0.3.0
11
index.ts
@@ -39,2 +39,10 @@ class MongoshRuntimeError extends Error { | ||
class MongoshCommandFailed extends Error { | ||
constructor(msg) { | ||
super(msg); | ||
this.name = 'MongoshCommandFailed'; | ||
this.message = `Command ${msg} returned ok: 0. To see the raw results of the command, use 'runCommand' instead.`; | ||
} | ||
} | ||
export { | ||
@@ -45,3 +53,4 @@ MongoshWarning, | ||
MongoshInvalidInputError, | ||
MongoshUnimplementedError | ||
MongoshUnimplementedError, | ||
MongoshCommandFailed | ||
}; |
@@ -16,2 +16,5 @@ declare class MongoshRuntimeError extends Error { | ||
} | ||
export { MongoshWarning, MongoshRuntimeError, MongoshInternalError, MongoshInvalidInputError, MongoshUnimplementedError }; | ||
declare class MongoshCommandFailed extends Error { | ||
constructor(msg: any); | ||
} | ||
export { MongoshWarning, MongoshRuntimeError, MongoshInternalError, MongoshInvalidInputError, MongoshUnimplementedError, MongoshCommandFailed }; |
@@ -36,2 +36,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MongoshCommandFailed = exports.MongoshUnimplementedError = exports.MongoshInvalidInputError = exports.MongoshInternalError = exports.MongoshRuntimeError = exports.MongoshWarning = void 0; | ||
var MongoshRuntimeError = (function (_super) { | ||
@@ -106,2 +107,13 @@ __extends(MongoshRuntimeError, _super); | ||
exports.MongoshWarning = MongoshWarning; | ||
var MongoshCommandFailed = (function (_super) { | ||
__extends(MongoshCommandFailed, _super); | ||
function MongoshCommandFailed(msg) { | ||
var _this = _super.call(this, msg) || this; | ||
_this.name = 'MongoshCommandFailed'; | ||
_this.message = "Command " + msg + " returned ok: 0. To see the raw results of the command, use 'runCommand' instead."; | ||
return _this; | ||
} | ||
return MongoshCommandFailed; | ||
}(Error)); | ||
exports.MongoshCommandFailed = MongoshCommandFailed; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@mongosh/errors", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"description": "MongoDB Shell Errors Package", | ||
@@ -27,3 +27,3 @@ "homepage": "https://github.com/mongodb-js/mongosh", | ||
}, | ||
"gitHead": "4e188a4336bb5f57bc2431811e54b90bf83b1cdf" | ||
"gitHead": "decab9f8f132403125d7084922a0b7a84afc8098" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23755
230