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.

parallelSave.js 598B

123456789101112131415161718192021222324252627282930313233
  1. 'use strict';
  2. /*!
  3. * Module dependencies.
  4. */
  5. const MongooseError = require('./');
  6. /**
  7. * ParallelSave Error constructor.
  8. *
  9. * @inherits MongooseError
  10. * @api private
  11. */
  12. function ParallelSaveError(doc) {
  13. const msg = 'Can\'t save() the same doc multiple times in parallel. Document: ';
  14. MongooseError.call(this, msg + doc.id);
  15. this.name = 'ParallelSaveError';
  16. }
  17. /*!
  18. * Inherits from MongooseError.
  19. */
  20. ParallelSaveError.prototype = Object.create(MongooseError.prototype);
  21. ParallelSaveError.prototype.constructor = MongooseError;
  22. /*!
  23. * exports
  24. */
  25. module.exports = ParallelSaveError;