Merge remote-tracking branch 'origin/develop'

This commit is contained in:
Julian Lam
2017-11-02 14:13:48 -04:00
58 changed files with 686 additions and 168 deletions

View File

@@ -104,7 +104,7 @@ mongoModule.init = function (callback) {
mongoClient.connect(connString, connOptions, function (err, _db) {
if (err) {
winston.error('NodeBB could not connect to your Mongo database. Mongo returned the following error: ' + err.message);
winston.error('NodeBB could not connect to your Mongo database. Mongo returned the following error', err);
return callback(err);
}
@@ -164,7 +164,7 @@ mongoModule.createIndices = function (callback) {
async.apply(createIndex, 'objects', { expireAt: 1 }, { expireAfterSeconds: 0, background: true }),
], function (err) {
if (err) {
winston.error('Error creating index ' + err.message);
winston.error('Error creating index', err);
return callback(err);
}
winston.info('[database] Checking database indices done!');

View File

@@ -99,8 +99,8 @@ redisModule.connect = function (options) {
if (dbIdx >= 0) {
cxn.select(dbIdx, function (err) {
if (err) {
winston.error('NodeBB could not connect to your Redis database. Redis returned the following error: ' + err.message);
process.exit();
winston.error('NodeBB could not connect to your Redis database. Redis returned the following error', err);
throw err;
}
});
}