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.

30 lines
533 B

  1. /*!
  2. * Module dependencies.
  3. */
  4. var MongooseError = require('../error');
  5. /*!
  6. * OverwriteModel Error constructor.
  7. *
  8. * @inherits MongooseError
  9. */
  10. function OverwriteModelError (name) {
  11. MongooseError.call(this, 'Cannot overwrite `' + name + '` model once compiled.');
  12. Error.captureStackTrace(this, arguments.callee);
  13. this.name = 'OverwriteModelError';
  14. };
  15. /*!
  16. * Inherits from MongooseError.
  17. */
  18. OverwriteModelError.prototype.__proto__ = MongooseError.prototype;
  19. /*!
  20. * exports
  21. */
  22. module.exports = OverwriteModelError;