mirror of
https://github.com/reality/dbot.git
synced 2024-11-30 16:09:27 +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];
|
if(propertyKey) delete require.cache[propertyKey];
|
||||||
propertyObj = require(moduleDir + property).fetch(this);
|
propertyObj = require(moduleDir + property).fetch(this);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
this.status[name] = 'Error loading ' + propertyKey + ': ' + err + ' - ' + err.stack.split('\n')[1].trim();
|
||||||
console.log('Module error (' + module.name + ') in ' + property + ': ' + err);
|
console.log('Module error (' + module.name + ') in ' + property + ': ' + err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user