summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/ClusterMap.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-01-06 17:01:12 +0000
committerAlan Conway <aconway@apache.org>2010-01-06 17:01:12 +0000
commitde23cb5942844463a237cff18c30e5f43ea5d5d0 (patch)
tree46bec589834871e67d7451aa472b0bb3c0cc5a4a /cpp/src/qpid/cluster/ClusterMap.cpp
parent469c2fe3cf3ecd99799074a67adc374381ac4533 (diff)
downloadqpid-python-de23cb5942844463a237cff18c30e5f43ea5d5d0.tar.gz
Exception handling for URL parsing in cluster.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@896537 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterMap.cpp')
-rw-r--r--cpp/src/qpid/cluster/ClusterMap.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/ClusterMap.cpp b/cpp/src/qpid/cluster/ClusterMap.cpp
index 8cac470ef3..85ed447113 100644
--- a/cpp/src/qpid/cluster/ClusterMap.cpp
+++ b/cpp/src/qpid/cluster/ClusterMap.cpp
@@ -137,9 +137,13 @@ ostream& operator<<(ostream& o, const ClusterMap& m) {
}
bool ClusterMap::updateRequest(const MemberId& id, const string& url) {
- if (isAlive(id)) {
- joiners[id] = Url(url);
- return true;
+ try {
+ if (isAlive(id)) {
+ joiners[id] = Url(url);
+ return true;
+ }
+ } catch (const Url::Invalid&) {
+ QPID_LOG(error, "Invalid URL in cluster update request: " << url);
}
return false;
}