From c5450573abc12bb23fcdb470f7fda58ab1a0676a Mon Sep 17 00:00:00 2001 From: "Blue (Lukas Rieger)" Date: Mon, 21 Jun 2021 23:47:49 +0200 Subject: [PATCH] Catch all throwables while enabling extensions --- src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java index 91f14e0..2164100 100644 --- a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java +++ b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java @@ -193,12 +193,12 @@ protected static synchronized boolean registerInstance(BlueMapAPI instance) thro BlueMapAPI.instance = instance; - List thrownExceptions = new ArrayList<>(0); + List thrownExceptions = new ArrayList<>(0); for (Consumer 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); } }