add try catch to plugin loading

This commit is contained in:
Jiiks 2018-01-20 19:47:00 +02:00
parent 2bcde666d8
commit b3f5f46e74
1 changed files with 6 additions and 1 deletions

View File

@ -66,7 +66,12 @@ class PluginManager extends Module {
const directories = await FileUtils.readDir(this.pluginsPath);
for (let dir of directories) {
await this.loadPlugin(dir);
try {
await this.loadPlugin(dir);
} catch (err) {
//We don't want every plugin to fail loading when one does
console.log(err);
}
}
return this.plugins;