From 667757395ab4a48a8d9543eac1bcac49fcb87e54 Mon Sep 17 00:00:00 2001 From: gjoranv Date: Wed, 13 Oct 2021 17:44:51 +0200 Subject: Allow exceptions from the config system to propagate up. --- .../src/main/java/com/yahoo/container/di/CloudSubscriber.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java b/container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java index 9201ad2a528..f252287b403 100644 --- a/container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java +++ b/container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java @@ -66,21 +66,14 @@ public class CloudSubscriber implements Subscriber { // default value in the def-file. There is a new 'components' config underway, where the // component is removed, so this old config generation will soon be replaced by a new one. boolean gotNextGen = false; - int numExceptions = 0; while ( ! gotNextGen) { try { if (subscriber.nextGeneration(isInitializing)) { gotNextGen = true; log.log(FINE, () -> this + " got next config generation " + subscriber.getGeneration() + "\n" + subscriber.toString()); } - } - catch (IllegalArgumentException e) { - numExceptions++; - log.log(Level.WARNING, this + " got exception from the config system (ignore if you just removed a " + - "component from your application that used the mentioned config) Subscriber info: " + - subscriber.toString(), e); - if (numExceptions >= 5) - throw new IllegalArgumentException("Failed retrieving the next config generation", e); + } catch (IllegalArgumentException e) { + throw new IllegalArgumentException("Failed retrieving the next config generation", e); } } -- cgit v1.2.3