forked from GitHub/dbot
Made stack trace dependant on dbot.config.debugMode
This commit is contained in:
parent
bea13e56f8
commit
cf53413bff
5
run.js
5
run.js
@ -229,8 +229,13 @@ DBot.prototype.reloadModules = function() {
|
||||
this.modules.push(module);
|
||||
} catch(err) {
|
||||
console.log(this.t('module_load_error', {'moduleName': name}));
|
||||
if(this.config.debugMode) {
|
||||
console.log('MODULE ERROR (' + name + '): ' + err.stack );
|
||||
}
|
||||
else {
|
||||
console.log('MODULE ERROR (' + name + '): ' + err );
|
||||
}
|
||||
}
|
||||
}.bind(this));
|
||||
this.save();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user