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
675 B

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