Skip to content

Commit c545057

Browse files
committed
Catch all throwables while enabling extensions
1 parent fbbd505 commit c545057

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ protected static synchronized boolean registerInstance(BlueMapAPI instance) thro
193193

194194
BlueMapAPI.instance = instance;
195195

196-
List<Exception> thrownExceptions = new ArrayList<>(0);
196+
List<Throwable> thrownExceptions = new ArrayList<>(0);
197197

198198
for (Consumer<BlueMapAPI> listener : BlueMapAPI.onEnableConsumers) {
199199
try {
200200
listener.accept(BlueMapAPI.instance);
201-
} catch (Exception ex) {
201+
} catch (Throwable ex) {
202202
thrownExceptions.add(ex);
203203
}
204204
}
@@ -207,7 +207,7 @@ protected static synchronized boolean registerInstance(BlueMapAPI instance) thro
207207
for (BlueMapAPIListener listener : BlueMapAPI.listener) {
208208
try {
209209
listener.onEnable(BlueMapAPI.instance);
210-
} catch (Exception ex) {
210+
} catch (Throwable ex) {
211211
thrownExceptions.add(ex);
212212
}
213213
}

0 commit comments

Comments
 (0)