forked from GitHub/dbot
print the error to console if it fails to load a module
This commit is contained in:
parent
b6607f7cd6
commit
b2ede3f5d5
@ -46,7 +46,7 @@ var badwords = function(dbot) {
|
|||||||
|
|
||||||
'ignorable': true
|
'ignorable': true
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.fetch = function(dbot) {
|
exports.fetch = function(dbot) {
|
||||||
return badwords(dbot);
|
return badwords(dbot);
|
||||||
|
1
run.js
1
run.js
@ -143,6 +143,7 @@ DBot.prototype.reloadModules = function() {
|
|||||||
this.modules.push(module);
|
this.modules.push(module);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(this.strings[this.language].module_load_error.format({'moduleName': name}));
|
console.log(this.strings[this.language].module_load_error.format({'moduleName': name}));
|
||||||
|
console.log(err);
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user