Socket
Socket
Sign inDemoInstall

@mongosh/errors

Package Overview
Dependencies
Maintainers
11
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mongosh/errors - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

25

index.ts
class MongoshRuntimeError extends Error {
constructor(...args) {
super(...args);
constructor(message: string) {
super(message);
this.name = 'MongoshRuntimeError';

@@ -9,4 +9,4 @@ }

class MongoshInternalError extends Error {
constructor(msg) {
super(msg);
constructor(message: string) {
super(message);
this.name = 'MongoshInternalError';

@@ -20,4 +20,4 @@ this.message =

class MongoshUnimplementedError extends Error {
constructor(...args) {
super(...args);
constructor(message: string) {
super(message);
this.name = 'MongoshUnimplementedError';

@@ -28,4 +28,4 @@ }

class MongoshInvalidInputError extends Error {
constructor(...args) {
super(...args);
constructor(message: string) {
super(message);
this.name = 'MongoshInvalidInputError';

@@ -36,4 +36,4 @@ }

class MongoshWarning extends Error {
constructor(...args) {
super(...args);
constructor(message: string) {
super(message);
this.name = 'MongoshWarning';

@@ -44,6 +44,5 @@ }

class MongoshCommandFailed extends Error {
constructor(msg) {
super(msg);
constructor(message: string) {
super(`Command ${message} returned ok: 0. To see the raw results of the command, use 'runCommand' instead.`);
this.name = 'MongoshCommandFailed';
this.message = `Command ${msg} returned ok: 0. To see the raw results of the command, use 'runCommand' instead.`;
}

@@ -50,0 +49,0 @@ }

declare class MongoshRuntimeError extends Error {
constructor(...args: any[]);
constructor(message: string);
}
declare class MongoshInternalError extends Error {
constructor(msg: any);
constructor(message: string);
}
declare class MongoshUnimplementedError extends Error {
constructor(...args: any[]);
constructor(message: string);
}
declare class MongoshInvalidInputError extends Error {
constructor(...args: any[]);
constructor(message: string);
}
declare class MongoshWarning extends Error {
constructor(...args: any[]);
constructor(message: string);
}
declare class MongoshCommandFailed extends Error {
constructor(msg: any);
constructor(message: string);
}
export { MongoshWarning, MongoshRuntimeError, MongoshInternalError, MongoshInvalidInputError, MongoshUnimplementedError, MongoshCommandFailed };
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MongoshCommandFailed = exports.MongoshUnimplementedError = exports.MongoshInvalidInputError = exports.MongoshInternalError = exports.MongoshRuntimeError = exports.MongoshWarning = void 0;
var MongoshRuntimeError = (function (_super) {
__extends(MongoshRuntimeError, _super);
function MongoshRuntimeError() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _this = _super.apply(this, __spread(args)) || this;
_this.name = 'MongoshRuntimeError';
return _this;
class MongoshRuntimeError extends Error {
constructor(message) {
super(message);
this.name = 'MongoshRuntimeError';
}
return MongoshRuntimeError;
}(Error));
}
exports.MongoshRuntimeError = MongoshRuntimeError;
var MongoshInternalError = (function (_super) {
__extends(MongoshInternalError, _super);
function MongoshInternalError(msg) {
var _this = _super.call(this, msg) || this;
_this.name = 'MongoshInternalError';
_this.message =
_this.message + '\nThis is an error inside Mongosh. Please file a bug report. '
class MongoshInternalError extends Error {
constructor(message) {
super(message);
this.name = 'MongoshInternalError';
this.message =
this.message + '\nThis is an error inside Mongosh. Please file a bug report. '
+ 'Please include a log file from this session.';
return _this;
}
return MongoshInternalError;
}(Error));
}
exports.MongoshInternalError = MongoshInternalError;
var MongoshUnimplementedError = (function (_super) {
__extends(MongoshUnimplementedError, _super);
function MongoshUnimplementedError() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _this = _super.apply(this, __spread(args)) || this;
_this.name = 'MongoshUnimplementedError';
return _this;
class MongoshUnimplementedError extends Error {
constructor(message) {
super(message);
this.name = 'MongoshUnimplementedError';
}
return MongoshUnimplementedError;
}(Error));
}
exports.MongoshUnimplementedError = MongoshUnimplementedError;
var MongoshInvalidInputError = (function (_super) {
__extends(MongoshInvalidInputError, _super);
function MongoshInvalidInputError() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _this = _super.apply(this, __spread(args)) || this;
_this.name = 'MongoshInvalidInputError';
return _this;
class MongoshInvalidInputError extends Error {
constructor(message) {
super(message);
this.name = 'MongoshInvalidInputError';
}
return MongoshInvalidInputError;
}(Error));
}
exports.MongoshInvalidInputError = MongoshInvalidInputError;
var MongoshWarning = (function (_super) {
__extends(MongoshWarning, _super);
function MongoshWarning() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _this = _super.apply(this, __spread(args)) || this;
_this.name = 'MongoshWarning';
return _this;
class MongoshWarning extends Error {
constructor(message) {
super(message);
this.name = 'MongoshWarning';
}
return MongoshWarning;
}(Error));
}
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;
class MongoshCommandFailed extends Error {
constructor(message) {
super(`Command ${message} returned ok: 0. To see the raw results of the command, use 'runCommand' instead.`);
this.name = 'MongoshCommandFailed';
}
return MongoshCommandFailed;
}(Error));
}
exports.MongoshCommandFailed = MongoshCommandFailed;
//# sourceMappingURL=index.js.map
{
"name": "@mongosh/errors",
"version": "0.5.0",
"version": "0.5.1",
"description": "MongoDB Shell Errors Package",

@@ -27,3 +27,3 @@ "homepage": "https://github.com/mongodb-js/mongosh",

},
"gitHead": "3b9b52c082c7e1c3c42e8d73d14c4cd0f05155bf"
"gitHead": "c81dccda2cc98d1d926a3acbac66240e5ed4f73c"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc