First Commit
This commit is contained in:
commit
601e886c14
2123 files changed
+334815
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
/*!
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const MongooseError = require('./');
|
||||
|
||||
/**
|
||||
* The connection failed to reconnect and will never successfully reconnect to
|
||||
* MongoDB without manual intervention.
|
||||
*
|
||||
* @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;
|
||||
Reference in new issue
Block a user