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.

32 lines
598 B

  1. /*!
  2. * Module dependencies.
  3. */
  4. var MongooseError = require('../error');
  5. /*!
  6. * MissingSchema Error constructor.
  7. *
  8. * @inherits MongooseError
  9. */
  10. function MissingSchemaError (name) {
  11. var msg = 'Schema hasn\'t been registered for model "' + name + '".\n'
  12. + 'Use mongoose.model(name, schema)';
  13. MongooseError.call(this, msg);
  14. Error.captureStackTrace(this, arguments.callee);
  15. this.name = 'MissingSchemaError';
  16. };
  17. /*!
  18. * Inherits from MongooseError.
  19. */
  20. MissingSchemaError.prototype.__proto__ = MongooseError.prototype;
  21. /*!
  22. * exports
  23. */
  24. module.exports = MissingSchemaError;