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.

index.js 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. 'use strict';
  2. const MongooseError = require('./mongooseError');
  3. /*!
  4. * Module exports.
  5. */
  6. module.exports = exports = MongooseError;
  7. /**
  8. * The default built-in validator error messages.
  9. *
  10. * @see Error.messages #error_messages_MongooseError-messages
  11. * @api public
  12. */
  13. MongooseError.messages = require('./messages');
  14. // backward compat
  15. MongooseError.Messages = MongooseError.messages;
  16. /**
  17. * An instance of this error class will be returned when `save()` fails
  18. * because the underlying
  19. * document was not found. The constructor takes one parameter, the
  20. * conditions that mongoose passed to `update()` when trying to update
  21. * the document.
  22. *
  23. * @api public
  24. */
  25. MongooseError.DocumentNotFoundError = require('./notFound');
  26. /**
  27. * An instance of this error class will be returned when mongoose failed to
  28. * cast a value.
  29. *
  30. * @api public
  31. */
  32. MongooseError.CastError = require('./cast');
  33. /**
  34. * An instance of this error class will be returned when [validation](/docs/validation.html) failed.
  35. *
  36. * @api public
  37. */
  38. MongooseError.ValidationError = require('./validation');
  39. /**
  40. * A `ValidationError` has a hash of `errors` that contain individual `ValidatorError` instances
  41. *
  42. * @api public
  43. */
  44. MongooseError.ValidatorError = require('./validator');
  45. /**
  46. * An instance of this error class will be returned when you call `save()` after
  47. * the document in the database was changed in a potentially unsafe way. See
  48. * the [`versionKey` option](/docs/guide.html#versionKey) for more information.
  49. *
  50. * @api public
  51. */
  52. MongooseError.VersionError = require('./version');
  53. /**
  54. * An instance of this error class will be returned when you call `save()` multiple
  55. * times on the same document in parallel. See the [FAQ](/docs/faq.html) for more
  56. * information.
  57. *
  58. * @api public
  59. */
  60. MongooseError.ParallelSaveError = require('./parallelSave');
  61. /**
  62. * Thrown when a model with the given name was already registered on the connection.
  63. * See [the FAQ about `OverwriteModelError`](/docs/faq.html#overwrite-model-error).
  64. *
  65. * @api public
  66. */
  67. MongooseError.OverwriteModelError = require('./overwriteModel');
  68. /**
  69. * Thrown when you try to access a model that has not been registered yet
  70. *
  71. * @api public
  72. */
  73. MongooseError.MissingSchemaError = require('./missingSchema');
  74. /**
  75. * An instance of this error will be returned if you used an array projection
  76. * and then modified the array in an unsafe way.
  77. *
  78. * @api public
  79. */
  80. MongooseError.DivergentArrayError = require('./divergentArray');