2019-06-04 14:29:48 +02:00
|
|
|
'use strict';
|
|
|
|
|
2019-07-02 16:05:15 +02:00
|
|
|
/*!
|
|
|
|
* ignore
|
2019-06-04 14:29:48 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
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;
|