/node_modules/mongoose/lib/error/disconnected.js
https://bitbucket.org/coleman333/smartsite · JavaScript · 40 lines · 15 code · 8 blank · 17 comment · 2 complexity · f3d26b29e54d3c45fbb5c81e40bc59c4 MD5 · raw file
- /*!
- * Module dependencies.
- */
- var MongooseError = require('./');
- /**
- * Casting Error constructor.
- *
- * @param {String} type
- * @param {String} value
- * @inherits MongooseError
- * @api private
- */
- function DisconnectedError(connectionString) {
- MongooseError.call(this, 'Ran out of retries trying to reconnect to "' +
- connectionString + '". Try setting `server.reconnectTries` and ' +
- '`server.reconnectInterval` to something higher.');
- this.name = 'DisconnectedError';
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this);
- } else {
- this.stack = new Error().stack;
- }
- }
- /*!
- * Inherits from MongooseError.
- */
- DisconnectedError.prototype = Object.create(MongooseError.prototype);
- DisconnectedError.prototype.constructor = MongooseError;
- /*!
- * exports
- */
- module.exports = DisconnectedError;