om/node_modules/mongoose/lib/error/mongooseError.js

26 lines
428 B
JavaScript
Raw Normal View History

'use strict';
2019-07-02 16:05:15 +02:00
/*!
* ignore
*/
function MongooseError(msg) {
Error.call(this);
if (Error.captureStackTrace) {
Error.captureStackTrace(this);
} else {
this.stack = new Error().stack;
}
this.message = msg;
this.name = 'MongooseError';
}
/*!
* Inherits from Error.
*/
MongooseError.prototype = Object.create(Error.prototype);
MongooseError.prototype.constructor = Error;
module.exports = MongooseError;