summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2019-09-24 09:26:28 +0000
committerArne Juul <arnej@yahoo-inc.com>2019-09-24 09:26:28 +0000
commitc918711564ba1951b0b733d860c3d2b56bc33905 (patch)
tree671cf07ec4cc81ae6f32d10c1d8a506f75cd815f /searchcore
parent11ab4237312e3f52fac8f5f82553ee2598ac5eed (diff)
catch exceptions in network setup
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp9
1 files changed, 6 insertions, 3 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 2e097e7141f..3b3b5f412d2 100644
--- a/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp
+++ b/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp
@@ -216,9 +216,12 @@ public:
fprintf(stderr, "Config system is not up. Verify that vespa is started.");
return 3;
}
-
- initRPC();
-
+ try {
+ initRPC();
+ } catch (vespalib::Exception &e) {
+ fprintf(stderr, "Exception in network initialization: %s", e.what());
+ return 2;
+ }
int port = 0;
std::string spec = _argv[1];