From e841196570803e153ede6a11ec4dadf2c0b3773b Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sun, 9 Mar 2014 11:42:45 -0500 Subject: [PATCH] Fix #332; add more helpful errors --- lib/channel.js | 2 +- lib/config.js | 3 ++- lib/database.js | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/channel.js b/lib/channel.js index d29281df..698896d0 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -872,7 +872,7 @@ Channel.prototype.handleBanAllIP = function (actor, name, reason, range) { } ips.forEach(function (ip) { - self.banIP(actor, ip, name, range); + self.banIP(actor, ip, name, reason, range); }); }); }; diff --git a/lib/config.js b/lib/config.js index 11cba7e3..628d5cfd 100644 --- a/lib/config.js +++ b/lib/config.js @@ -115,6 +115,7 @@ exports.load = function (file) { return; } else { Logger.errlog.log("Error loading config file " + file + ": "); + Logger.errlog.log(e); if (e.stack) { Logger.errlog.log(e.stack); } @@ -185,7 +186,7 @@ function preprocessConfig(cfg) { } cfg.https["full-address"] = httpsfa; } - + // Generate RegExps for reserved names var reserved = cfg["reserved-names"]; for (var key in reserved) { diff --git a/lib/database.js b/lib/database.js index d4f2e0bb..d02c5aec 100644 --- a/lib/database.js +++ b/lib/database.js @@ -22,6 +22,7 @@ module.exports.init = function () { pool.getConnection(function (err, conn) { if(err) { Logger.errlog.log("! DB connection failed"); + Logger.errlog.log(err); return; } else { tables.init(module.exports.query, function (err) {