Author: gsim
Date: Tue Mar 20 10:35:28 2007
New Revision: 520493
URL: http://svn.apache.org/viewvc?view=rev&rev=520493
Log:
Catch exception now thrown by ExchangeRegistry::getDefault() when a default has
not been set.
Modified:
incubator/qpid/branches/qpid.0-9/cpp/lib/broker/RecoveryManager.cpp
Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/broker/RecoveryManager.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/broker/RecoveryManager.cpp?view=diff&rev=520493&r1=520492&r2=520493
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/broker/RecoveryManager.cpp
(original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/broker/RecoveryManager.cpp Tue Mar
20 10:35:28 2007
@@ -29,9 +29,13 @@
Queue::shared_ptr RecoveryManager::recoverQueue(const string& name)
{
std::pair<Queue::shared_ptr, bool> result = queues.declare(name, true);
- Exchange::shared_ptr exchange = exchanges.getDefault();
- if (exchange) {
- exchange->bind(result.first, result.first->getName(), 0);
+ try {
+ Exchange::shared_ptr exchange = exchanges.getDefault();
+ if (exchange) {
+ exchange->bind(result.first, result.first->getName(), 0);
+ }
+ } catch (ChannelException& e) {
+ //assume no default exchange has been declared
}
return result.first;
}