diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-05-25 12:59:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 12:59:28 +0200 |
commit | 6067d082653ab2994a80ccdaeca72bdf46e65e10 (patch) | |
tree | 583413bcb8fdd52641ee69fcbe687ec9087e57eb /searchcore | |
parent | 712ffc989d2767325b3a91c192fa0a68721ace82 (diff) | |
parent | cca91931632a474cb135b0d314ea475f8e8d6dd9 (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.cpp | 4 |
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 ""; } |