You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
537 B

  1. 'use strict';
  2. /*!
  3. * Module dependencies.
  4. */
  5. var MongooseError = require('../error.js');
  6. /**
  7. * Version Error constructor.
  8. *
  9. * @inherits MongooseError
  10. * @api private
  11. */
  12. function VersionError(doc) {
  13. MongooseError.call(this, 'No matching document found for id "' + doc._id +
  14. '"');
  15. this.name = 'VersionError';
  16. }
  17. /*!
  18. * Inherits from MongooseError.
  19. */
  20. VersionError.prototype = Object.create(MongooseError.prototype);
  21. VersionError.prototype.constructor = MongooseError;
  22. /*!
  23. * exports
  24. */
  25. module.exports = VersionError;