summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-21 14:37:02 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-08-21 14:37:02 +0200
commitb829482c43d3240a6cea55f2fc43c7aaeb08494f (patch)
tree8c7d542eb6cea4099f2d517170a7a1e7b358c4ed /config
parente73156a2b9ed83577db6299113834fb49c224b8c (diff)
Catch and log expected exception and exit quickly instead of dumping core.
Diffstat (limited to 'config')
-rw-r--r--config/src/vespa/config/helper/configpoller.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/src/vespa/config/helper/configpoller.cpp b/config/src/vespa/config/helper/configpoller.cpp
index 7620695725b..65c505e81d8 100644
--- a/config/src/vespa/config/helper/configpoller.cpp
+++ b/config/src/vespa/config/helper/configpoller.cpp
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "configpoller.h"
+#include <vespa/config/common/exceptions.h>
#include <vespa/log/log.h>
LOG_SETUP(".config.helper.configpoller");
@@ -21,8 +22,13 @@ ConfigPoller::~ConfigPoller() { }
void
ConfigPoller::run()
{
- while (!_subscriber.isClosed()) {
- poll();
+ try {
+ while (!_subscriber.isClosed()) {
+ poll();
+ }
+ } catch (config::InvalidConfigException & e) {
+ LOG(fatal, "Got exception, will just exit quickly : %s", e.what());
+ std::quick_exit(17);
}
}