browserMissingSchema.js 467 B

12345678910111213141516171819202122232425262728
  1. /*!
  2. * Module dependencies.
  3. */
  4. 'use strict';
  5. const MongooseError = require('./');
  6. class MissingSchemaError extends MongooseError {
  7. /*!
  8. * MissingSchema Error constructor.
  9. */
  10. constructor() {
  11. super('Schema hasn\'t been registered for document.\n'
  12. + 'Use mongoose.Document(name, schema)');
  13. }
  14. }
  15. Object.defineProperty(MissingSchemaError.prototype, 'name', {
  16. value: 'MongooseError'
  17. });
  18. /*!
  19. * exports
  20. */
  21. module.exports = MissingSchemaError;