3
0
mirror of https://github.com/reality/dbot.git synced 2025-01-23 18:44:14 +01:00

Made stack trace dependant on dbot.config.debugMode

This commit is contained in:
Daniel Evans 2012-12-24 03:13:41 +00:00
parent bea13e56f8
commit cf53413bff

7
run.js
View File

@ -229,7 +229,12 @@ DBot.prototype.reloadModules = function() {
this.modules.push(module);
} catch(err) {
console.log(this.t('module_load_error', {'moduleName': name}));
console.log('MODULE ERROR (' + name + '): ' + err.stack );
if(this.config.debugMode) {
console.log('MODULE ERROR (' + name + '): ' + err.stack );
}
else {
console.log('MODULE ERROR (' + name + '): ' + err );
}
}
}.bind(this));
this.save();