qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r962586 - /qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
Date Fri, 09 Jul 2010 16:06:44 GMT
Author: gsim
Date: Fri Jul  9 16:06:44 2010
New Revision: 962586

URL: http://svn.apache.org/viewvc?rev=962586&view=rev
Log:
QPID-2727: Handle exceptions in Broker constructor and call finalise to safely cleanup plugins

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp?rev=962586&r1=962585&r2=962586&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp Fri Jul  9 16:06:44 2010
@@ -165,6 +165,7 @@ Broker::Broker(const Broker::Options& co
     getKnownBrokers(boost::bind(&Broker::getKnownBrokersImpl, this)),
     deferDelivery(boost::bind(&Broker::deferDeliveryImpl, this, _1, _2))
 {
+    try {
     if (conf.enableMgmt) {
         QPID_LOG(info, "Management enabled");
         managementAgent->configure(dataDir.isEnabled() ? dataDir.getPath() : string(),
@@ -289,6 +290,10 @@ Broker::Broker(const Broker::Options& co
     } else if (conf.knownHosts != knownHostsNone) {
         knownBrokers.push_back(Url(conf.knownHosts));
     }
+    } catch (const std::exception& e) {
+        finalize();
+        throw;
+    }
 }
 
 void Broker::declareStandardExchange(const std::string& name, const std::string&
type)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message