From cf53413bfffd6d65c83cb9b0e07b801473f16460 Mon Sep 17 00:00:00 2001 From: Daniel Evans Date: Mon, 24 Dec 2012 03:13:41 +0000 Subject: [PATCH] Made stack trace dependant on dbot.config.debugMode --- run.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run.js b/run.js index 8ebbdc5..26ddcea 100644 --- a/run.js +++ b/run.js @@ -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();