Skip to content

Commit

Permalink
Catch throwables when loading plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Joo200 committed Oct 11, 2023
1 parent 2bd2c69 commit 2bcbc49
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void loadPlugins(Path directory) throws IOException {
for (Path path : stream) {
try {
found.add(loader.loadCandidate(path));
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Unable to load plugin {}", path, e);
}
}
Expand Down Expand Up @@ -126,7 +126,7 @@ public void loadPlugins(Path directory) throws IOException {
VelocityPluginContainer container = new VelocityPluginContainer(realPlugin);
pluginContainers.put(container, loader.createModule(container));
loadedPluginsById.add(realPlugin.getId());
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Can't create module for plugin {}", candidate.getId(), e);
}
}
Expand All @@ -153,7 +153,7 @@ protected void configure() {

try {
loader.createPlugin(container, plugin.getValue(), commonModule);
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Can't create plugin {}", description.getId(), e);
continue;
}
Expand Down

0 comments on commit 2bcbc49

Please sign in to comment.