Skip to content

Commit

Permalink
Catch all throwables while enabling extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Jun 21, 2021
1 parent fbbd505 commit c545057
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ protected static synchronized boolean registerInstance(BlueMapAPI instance) thro

BlueMapAPI.instance = instance;

List<Exception> thrownExceptions = new ArrayList<>(0);
List<Throwable> thrownExceptions = new ArrayList<>(0);

for (Consumer<BlueMapAPI> listener : BlueMapAPI.onEnableConsumers) {
try {
listener.accept(BlueMapAPI.instance);
} catch (Exception ex) {
} catch (Throwable ex) {
thrownExceptions.add(ex);
}
}
Expand All @@ -207,7 +207,7 @@ protected static synchronized boolean registerInstance(BlueMapAPI instance) thro
for (BlueMapAPIListener listener : BlueMapAPI.listener) {
try {
listener.onEnable(BlueMapAPI.instance);
} catch (Exception ex) {
} catch (Throwable ex) {
thrownExceptions.add(ex);
}
}
Expand Down

0 comments on commit c545057

Please sign in to comment.