activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1393799 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels: ActiveMQConsumerKernel.cpp ActiveMQProducerKernel.cpp ActiveMQSessionKernel.cpp
Date Wed, 03 Oct 2012 22:23:32 GMT
Author: tabish
Date: Wed Oct  3 22:23:32 2012
New Revision: 1393799

URL: http://svn.apache.org/viewvc?rev=1393799&view=rev
Log:
Polish up some of the code a bit, better destructor impls.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp?rev=1393799&r1=1393798&r2=1393799&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
Wed Oct  3 22:23:32 2012
@@ -390,15 +390,14 @@ ActiveMQConsumerKernel::ActiveMQConsumer
 ActiveMQConsumerKernel::~ActiveMQConsumerKernel() {
 
     try {
+        this->close();
+    }
+    AMQ_CATCHALL_NOTHROW()
 
-        try {
-            this->close();
-        } catch(...) {}
-
+    try {
         delete this->internal;
     }
-    AMQ_CATCH_NOTHROW( ActiveMQException )
-    AMQ_CATCHALL_NOTHROW( )
+    AMQ_CATCHALL_NOTHROW()
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp?rev=1393799&r1=1393798&r2=1393799&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp
Wed Oct  3 22:23:32 2012
@@ -89,14 +89,13 @@ ActiveMQProducerKernel::~ActiveMQProduce
     try {
         close();
     }
-    AMQ_CATCH_NOTHROW( ActiveMQException )
-    AMQ_CATCHALL_NOTHROW( )
+    AMQ_CATCHALL_NOTHROW()
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void ActiveMQProducerKernel::close() {
 
-    try{
+    try {
 
         if (!this->isClosed()) {
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp?rev=1393799&r1=1393798&r2=1393799&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
Wed Oct  3 22:23:32 2012
@@ -235,13 +235,14 @@ ActiveMQSessionKernel::ActiveMQSessionKe
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQSessionKernel::~ActiveMQSessionKernel() {
     try {
-        // Destroy this session's resources
         close();
     }
-    AMQ_CATCH_NOTHROW( ActiveMQException )
-    AMQ_CATCHALL_NOTHROW( )
+    AMQ_CATCHALL_NOTHROW()
 
-    delete this->config;
+    try {
+        delete this->config;
+    }
+    AMQ_CATCHALL_NOTHROW()
 }
 
 ////////////////////////////////////////////////////////////////////////////////



Mime
View raw message