Ohm-Management - Projektarbeit B-ME
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.

browserMissingSchema.js 726B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*!
  2. * Module dependencies.
  3. */
  4. 'use strict';
  5. const MongooseError = require('./');
  6. /*!
  7. * MissingSchema Error constructor.
  8. *
  9. * @inherits MongooseError
  10. */
  11. function MissingSchemaError() {
  12. const msg = 'Schema hasn\'t been registered for document.\n'
  13. + 'Use mongoose.Document(name, schema)';
  14. MongooseError.call(this, msg);
  15. this.name = 'MissingSchemaError';
  16. if (Error.captureStackTrace) {
  17. Error.captureStackTrace(this);
  18. } else {
  19. this.stack = new Error().stack;
  20. }
  21. }
  22. /*!
  23. * Inherits from MongooseError.
  24. */
  25. MissingSchemaError.prototype = Object.create(MongooseError.prototype);
  26. MissingSchemaError.prototype.constructor = MongooseError;
  27. /*!
  28. * exports
  29. */
  30. module.exports = MissingSchemaError;