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.

disconnected.js 852B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*!
  2. * Module dependencies.
  3. */
  4. 'use strict';
  5. const MongooseError = require('./');
  6. /**
  7. * Casting Error constructor.
  8. *
  9. * @param {String} type
  10. * @param {String} value
  11. * @inherits MongooseError
  12. * @api private
  13. */
  14. function DisconnectedError(connectionString) {
  15. MongooseError.call(this, 'Ran out of retries trying to reconnect to "' +
  16. connectionString + '". Try setting `server.reconnectTries` and ' +
  17. '`server.reconnectInterval` to something higher.');
  18. this.name = 'DisconnectedError';
  19. if (Error.captureStackTrace) {
  20. Error.captureStackTrace(this);
  21. } else {
  22. this.stack = new Error().stack;
  23. }
  24. }
  25. /*!
  26. * Inherits from MongooseError.
  27. */
  28. DisconnectedError.prototype = Object.create(MongooseError.prototype);
  29. DisconnectedError.prototype.constructor = MongooseError;
  30. /*!
  31. * exports
  32. */
  33. module.exports = DisconnectedError;