3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-26 04:32:37 +01:00

Merge pull request #82 from danharibo/master

Made module error output more helpful
This commit is contained in:
Luke Slater 2012-12-23 19:14:07 -08:00
commit 31dd8c6be2

7
run.js
View File

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