aboutsummaryrefslogtreecommitdiffstats
path: root/container-di
diff options
context:
space:
mode:
authorgjoranv <gv@oath.com>2017-10-05 01:07:44 +0200
committergjoranv <gv@oath.com>2017-10-05 01:07:44 +0200
commit369e2484afecf40e29ba3aecfd5f54d234afacd5 (patch)
tree983cff593a0a90f2a7427d77305f5855a48e0c0d /container-di
parent5966ef16e7e928bb8bb9b9e5dd63e44ec2527ed7 (diff)
Log a warning upon exceptions from the config system.
- Specifically targeted at IllegalArgumentException from the constructor of config classes, thrown when a config parameter is uninitialized. - https://github.com/vespa-engine/vespa/issues/3610
Diffstat (limited to 'container-di')
-rw-r--r--container-di/src/main/scala/com/yahoo/container/di/CloudSubscriberFactory.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/container-di/src/main/scala/com/yahoo/container/di/CloudSubscriberFactory.scala b/container-di/src/main/scala/com/yahoo/container/di/CloudSubscriberFactory.scala
index 23ae21ae84e..0306f536109 100644
--- a/container-di/src/main/scala/com/yahoo/container/di/CloudSubscriberFactory.scala
+++ b/container-di/src/main/scala/com/yahoo/container/di/CloudSubscriberFactory.scala
@@ -65,7 +65,7 @@ object CloudSubscriberFactory {
override def waitNextGeneration() = {
require(!handles.isEmpty)
- /* Catch and ignore config exceptions due to missing config values for parameters that do
+ /* Catch and just log config exceptions due to missing config values for parameters that do
* not have a default value. These exceptions occur when the user has removed a component
* from services.xml, and the component takes a config that has parameters without a
* default value in the def-file. There is a new 'components' config underway, where the
@@ -79,7 +79,9 @@ object CloudSubscriberFactory {
} catch {
case e: IllegalArgumentException =>
numExceptions += 1
- log.log(LogLevel.DEBUG, "Ignoring exception from the config library: " + e.getMessage + "\n" + e.getStackTrace)
+ log.warning("Got exception from the config system (please ignore the exception if you just removed "
+ + "a component from your application that used the mentioned config): "
+ + e.getMessage + "\n" + e.getStackTrace)
if (numExceptions >= 5)
throw new IllegalArgumentException("Failed retrieving the next config generation.", e)
}