|
123456789101112131415161718192021222324252627282930313233343536 |
- 'use strict';
-
-
-
- const MongooseError = require('./');
-
-
-
- function VersionError(doc, currentVersion, modifiedPaths) {
- const modifiedPathsStr = modifiedPaths.join(', ');
- MongooseError.call(this, 'No matching document found for id "' + doc._id +
- '" version ' + currentVersion + ' modifiedPaths "' + modifiedPathsStr + '"');
- this.name = 'VersionError';
- this.version = currentVersion;
- this.modifiedPaths = modifiedPaths;
- }
-
-
-
- VersionError.prototype = Object.create(MongooseError.prototype);
- VersionError.prototype.constructor = MongooseError;
-
-
-
- module.exports = VersionError;
|