arnaucube
arnaucube/thoughtsPublic Self-hosted repository
thoughts/node_modules/mongoose/lib/error/version.js
node_modules/mongoose/lib/error/version.jsRaw
 1'use strict';
 2
 3/*!
 4 * Module dependencies.
 5 */
 6
 7var MongooseError = require('../error.js');
 8
 9/**
10 * Version Error constructor.
11 *
12 * @inherits MongooseError
13 * @api private
14 */
15
16function VersionError(doc) {
17  MongooseError.call(this, 'No matching document found for id "' + doc._id +
18    '"');
19  this.name = 'VersionError';
20}
21
22/*!
23 * Inherits from MongooseError.
24 */
25
26VersionError.prototype = Object.create(MongooseError.prototype);
27VersionError.prototype.constructor = MongooseError;
28
29/*!
30 * exports
31 */
32
33module.exports = VersionError;