mirror of
https://github.com/BlueMap-Minecraft/BlueMapAPI.git
synced 2024-11-17 07:45:11 +01:00
Catch all throwables while enabling extensions
This commit is contained in:
parent
fbbd505fa6
commit
c5450573ab
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user