print the error to console if it fails to load a module

This commit is contained in:
Luke Slater 2012-04-19 12:14:08 +01:00
parent b6607f7cd6
commit b2ede3f5d5
2 changed files with 2 additions and 1 deletions

View File

@ -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
View File

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