summaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/sentinel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'configd/src/apps/sentinel/sentinel.cpp')
-rw-r--r--configd/src/apps/sentinel/sentinel.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/configd/src/apps/sentinel/sentinel.cpp b/configd/src/apps/sentinel/sentinel.cpp
index 023b96ce96c..126c59d42f3 100644
--- a/configd/src/apps/sentinel/sentinel.cpp
+++ b/configd/src/apps/sentinel/sentinel.cpp
@@ -5,6 +5,7 @@
#include <unistd.h>
#include <sys/time.h>
#include <vespa/vespalib/util/signalhandler.h>
+#include <vespa/vespalib/util/exceptions.h>
#include <vespa/defaults.h>
#include "config-handler.h"
@@ -85,8 +86,15 @@ main(int argc, char **argv)
vespalib::SignalHandler::CHLD.clear();
handler.doWork(); // Check for child procs & commands
} catch (InvalidConfigException& ex) {
- LOG(warning, "Configuration problem: (ignoring): %s",
- ex.what());
+ LOG(warning, "Configuration problem: (ignoring): %s", ex.what());
+ } catch (vespalib::PortListenException& ex) {
+ LOG(error, "Fatal: %s", ex.getMessage().c_str());
+ EV_STOPPING("config-sentinel", ex.what());
+ exit(EXIT_FAILURE);
+ } catch (vespalib::FatalException& ex) {
+ LOG(error, "Fatal: %s", ex.getMessage().c_str());
+ EV_STOPPING("config-sentinel", ex.what());
+ exit(EXIT_FAILURE);
}
if (vespalib::SignalHandler::CHLD.check()) {
continue;