summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-05-25 12:59:28 +0200
committerGitHub <noreply@github.com>2021-05-25 12:59:28 +0200
commit6067d082653ab2994a80ccdaeca72bdf46e65e10 (patch)
tree583413bcb8fdd52641ee69fcbe687ec9087e57eb /searchcore
parent712ffc989d2767325b3a91c192fa0a68721ace82 (diff)
parentcca91931632a474cb135b0d314ea475f8e8d6dd9 (diff)
Merge pull request #17957 from vespa-engine/balder/avoid-core-dump
Avoid coredump on bad/empty config.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp b/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp
index 8b6203c78a2..50a2aecce76 100644
--- a/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp
+++ b/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp
@@ -3,6 +3,7 @@
#include <vespa/slobrok/sbmirror.h>
#include <vespa/config/common/configsystem.h>
#include <vespa/config/common/exceptions.h>
+#include <vespa/vespalib/util/exceptions.h>
#include <vespa/fnet/frt/supervisor.h>
#include <vespa/fnet/frt/target.h>
#include <vespa/vespalib/util/host_name.h>
@@ -158,6 +159,9 @@ public:
} catch (config::InvalidConfigException& e) {
fprintf(stderr, "ERROR: failed to get service location broker configuration\n");
std::_Exit(1);
+ } catch (vespalib::IllegalStateException& e) {
+ fprintf(stderr, "ERROR: empty or invalid service location broker configuration: %s\n", e.what());
+ std::_Exit(2);
}
return "";
}