diff options
Diffstat (limited to 'cpp/src/qpid/broker/Exchange.cpp')
-rw-r--r-- | cpp/src/qpid/broker/Exchange.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cpp/src/qpid/broker/Exchange.cpp b/cpp/src/qpid/broker/Exchange.cpp index d68845062d..5d763bf0da 100644 --- a/cpp/src/qpid/broker/Exchange.cpp +++ b/cpp/src/qpid/broker/Exchange.cpp @@ -279,12 +279,10 @@ uint32_t Exchange::encodedSize() const void Exchange::recoveryComplete(ExchangeRegistry& exchanges) { if (!alternateName.empty()) { - try { - Exchange::shared_ptr ae = exchanges.get(alternateName); - setAlternate(ae); - } catch (const NotFoundException&) { - QPID_LOG(warning, "Could not set alternate exchange \"" << alternateName << "\": does not exist."); - } + Exchange::shared_ptr ae = exchanges.find(alternateName); + if (ae) setAlternate(ae); + else QPID_LOG(warning, "Could not set alternate exchange \"" + << alternateName << "\": does not exist."); } } |