Catch all throwables while enabling extensions

This commit is contained in:
Blue (Lukas Rieger) 2021-06-21 23:47:49 +02:00
parent fbbd505fa6
commit c5450573ab
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800

View File

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