something is working

This commit is contained in:
quoije
2022-09-15 01:55:36 -04:00
parent a0aa251c27
commit f38e69883c
1123 changed files with 251731 additions and 11 deletions
+33
View File
@@ -0,0 +1,33 @@
/*!
* Module dependencies.
*/
'use strict';
const MongooseError = require('./');
class StrictModeError extends MongooseError {
/**
* Strict mode error constructor
*
* @param {String} path
* @param {String} [msg]
* @param {Boolean} [immutable]
* @inherits MongooseError
* @api private
*/
constructor(path, msg, immutable) {
msg = msg || 'Field `' + path + '` is not in schema and strict ' +
'mode is set to throw.';
super(msg);
this.isImmutableError = !!immutable;
this.path = path;
}
}
Object.defineProperty(StrictModeError.prototype, 'name', {
value: 'StrictModeError'
});
module.exports = StrictModeError;