mirror of
https://github.com/reality/dbot.git
synced 2024-12-28 05:32:50 +01:00
error reporting in status for properties [#198]
This commit is contained in:
parent
e9480b6f64
commit
18a079c4be
1
run.js
1
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user