diff options
author | gjoranv <gv@verizonmedia.com> | 2021-10-13 17:44:51 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2021-10-13 17:59:08 +0200 |
commit | 667757395ab4a48a8d9543eac1bcac49fcb87e54 (patch) | |
tree | 3d3023aa37c11aae001564968f0f2d151816f7c4 /container-core | |
parent | c50851c62aa2310d00594e302b6f7dbdf40ae92c (diff) |
Allow exceptions from the config system to propagate up.
Diffstat (limited to 'container-core')
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java | 11 |
1 files 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); } } |