From 18a079c4beb3d007da97323b34747c8700ff2bf1 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 24 Jan 2013 21:53:24 +0000 Subject: [PATCH] error reporting in status for properties [#198] --- run.js | 1 + 1 file changed, 1 insertion(+) diff --git a/run.js b/run.js index 15a110e..a32c869 100644 --- a/run.js +++ b/run.js @@ -232,6 +232,7 @@ DBot.prototype.reloadModules = function() { if(propertyKey) delete require.cache[propertyKey]; propertyObj = require(moduleDir + property).fetch(this); } catch(err) { + this.status[name] = 'Error loading ' + propertyKey + ': ' + err + ' - ' + err.stack.split('\n')[1].trim(); console.log('Module error (' + module.name + ') in ' + property + ': ' + err); } }