activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r620365 - /activemq/activemq-cpp/trunk/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp
Date Mon, 11 Feb 2008 00:54:47 GMT
Author: nmittler
Date: Sun Feb 10 16:54:45 2008
New Revision: 620365

URL: http://svn.apache.org/viewvc?rev=620365&view=rev
Log:
AMQCPP-152 - Adding exception handling to ResourceLifecycleManager.destroy

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp?rev=620365&r1=620364&r2=620365&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp Sun
Feb 10 16:54:45 2008
@@ -49,32 +49,44 @@
 
     // Close all the connections.
     for (std::size_t ix=0; ix<connections.size(); ++ix) {
-        connections[ix]->close();
+        try {
+            connections[ix]->close();
+        } catch(...){}
     }
 
     // Destroy the producers.
     for (std::size_t ix=0; ix<producers.size(); ++ix) {
-        delete producers[ix];
+        try {
+            delete producers[ix];
+        } catch( ... ) {}
     }
 
     // Destroy the consumers.
     for (std::size_t ix=0; ix<consumers.size(); ++ix) {
-        delete consumers[ix];
+        try {
+            delete consumers[ix];
+        } catch( ... ) {}
     }
 
     // Destroy the destinations.
     for (std::size_t ix=0; ix<destinations.size(); ++ix) {
-        delete destinations[ix];
+        try {
+            delete destinations[ix];
+        } catch( ... ) {}
     }
 
     // Destroy the sessions.
     for (std::size_t ix=0; ix<sessions.size(); ++ix) {
-        delete sessions[ix];
+        try {
+            delete sessions[ix];
+        } catch( ... ) {}
     }
 
     // Destroy the connections,
     for (std::size_t ix=0; ix<connections.size(); ++ix) {
-        delete connections[ix];
+        try {
+            delete connections[ix];
+        } catch( ... ) {}
     }
 
     // Empty all the vectors.



Mime
View raw message