3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00

error reporting in status for properties [#198]

This commit is contained in:
reality 2013-01-24 21:53:24 +00:00
parent e9480b6f64
commit 18a079c4be

1
run.js
View File

@ -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);
}
}