summaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/config-handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'configd/src/apps/sentinel/config-handler.cpp')
-rw-r--r--configd/src/apps/sentinel/config-handler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/configd/src/apps/sentinel/config-handler.cpp b/configd/src/apps/sentinel/config-handler.cpp
index a73a5f01f33..7b68e6c8150 100644
--- a/configd/src/apps/sentinel/config-handler.cpp
+++ b/configd/src/apps/sentinel/config-handler.cpp
@@ -5,6 +5,8 @@
#include <vespa/vespalib/net/simple_metric_snapshot.h>
#include <vespa/vespalib/net/socket_address.h>
+#include <vespa/vespalib/util/exceptions.h>
+#include <string>
#include <fcntl.h>
#include <sys/wait.h>
@@ -24,9 +26,7 @@ ConfigHandler::configure_port(int port)
}
}
if (port <= 0 || port > 65535) {
- LOG(error, "Fatal: bad port %d, expected range [1,65535]", port);
- EV_STOPPING("config-sentinel", "bad port");
- exit(EXIT_FAILURE);
+ throw vespalib::FatalException("Bad port " + std::to_string(port) + ", expected range [1, 65535]", VESPA_STRLOC);
}
if (port != _boundPort) {
LOG(debug, "Config-sentinel accepts connections on port %d", port);