diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-05-25 04:39:31 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-05-25 04:43:42 +0000 |
commit | 20de9a7e08c18495add9ddda9b90dcad895118d6 (patch) | |
tree | 01ce3d4482263f3e89d6e8293b07d2cc5e6738e7 /searchcore | |
parent | b19bf890f1a3b45989686532734f9a15abd43d67 (diff) |
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..b5dfeea8e20 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\n"); + std::_Exit(2); } return ""; } |