You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2007/06/14 15:03:25 UTC

svn commit: r547241 - in /incubator/qpid/trunk/qpid/cpp/src: qpid/broker/DtxHandlerImpl.cpp qpid/sys/apr/LFProcessor.cpp tests/echo_service.cpp tests/interop_runner.cpp tests/topic_listener.cpp tests/topic_publisher.cpp

Author: aconway
Date: Thu Jun 14 06:03:22 2007
New Revision: 547241

URL: http://svn.apache.org/viewvc?view=rev&rev=547241
Log:

Fixed catch clauses to catch by const & and use std::exception for
"generic" catches.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/echo_service.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/interop_runner.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp?view=diff&rev=547241&r1=547240&r2=547241
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp Thu Jun 14 06:03:22 2007
@@ -77,7 +77,7 @@
             }
             dClient.endOk(XA_OK, context.getRequestId());
         }
-    } catch (DtxTimeoutException e) {
+    } catch (const DtxTimeoutException& e) {
         dClient.endOk(XA_RBTIMEOUT, context.getRequestId());        
     }
 }
@@ -98,7 +98,7 @@
             channel.startDtx(xid, broker.getDtxManager(), join);
         }
         dClient.startOk(XA_OK, context.getRequestId());
-    } catch (DtxTimeoutException e) {
+    } catch (const DtxTimeoutException& e) {
         dClient.startOk(XA_RBTIMEOUT, context.getRequestId());        
     }
 }
@@ -112,7 +112,7 @@
     try {
         bool ok = broker.getDtxManager().prepare(xid);
         cClient.prepareOk(ok ? XA_OK : XA_RBROLLBACK, context.getRequestId());
-    } catch (DtxTimeoutException e) {
+    } catch (const DtxTimeoutException& e) {
         cClient.prepareOk(XA_RBTIMEOUT, context.getRequestId());        
     }
 }
@@ -125,7 +125,7 @@
     try {
         bool ok = broker.getDtxManager().commit(xid, onePhase);
         cClient.commitOk(ok ? XA_OK : XA_RBROLLBACK, context.getRequestId());
-    } catch (DtxTimeoutException e) {
+    } catch (const DtxTimeoutException& e) {
         cClient.commitOk(XA_RBTIMEOUT, context.getRequestId());        
     }
 }
@@ -138,7 +138,7 @@
     try {
         broker.getDtxManager().rollback(xid);
         cClient.rollbackOk(XA_OK, context.getRequestId());
-    } catch (DtxTimeoutException e) {
+    } catch (const DtxTimeoutException& e) {
         cClient.rollbackOk(XA_RBTIMEOUT, context.getRequestId());        
     }
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp?view=diff&rev=547241&r1=547240&r2=547241
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp Thu Jun 14 06:03:22 2007
@@ -136,7 +136,7 @@
                 session->stopProcessing();
             }
         }
-    }catch(std::exception e){
+    }catch(const std::exception& e){
 	QPID_LOG(error,  e.what());
     }
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/echo_service.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/echo_service.cpp?view=diff&rev=547241&r1=547240&r2=547241
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/echo_service.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/echo_service.cpp Thu Jun 14 06:03:22 2007
@@ -135,7 +135,7 @@
             }
             
             connection.close();
-        } catch(qpid::QpidError error) {
+        } catch(std::exception& error) {
             std::cout << error.what() << std::endl;
         }        
     } else {
@@ -164,7 +164,7 @@
             channel.run();
             
             connection.close();
-        } catch(qpid::QpidError error) {
+        } catch(std::exception& error) {
             std::cout << error.what() << std::endl;
         }
     }

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/interop_runner.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/interop_runner.cpp?view=diff&rev=547241&r1=547240&r2=547241
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/interop_runner.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/interop_runner.cpp Thu Jun 14 06:03:22 2007
@@ -116,7 +116,7 @@
             
             channel.run();
             connection.close();
-        } catch(qpid::Exception error) {
+        } catch(const std::exception& error) {
             std::cout << error.what() << std::endl;
         }
     }

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp?view=diff&rev=547241&r1=547240&r2=547241
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp Thu Jun 14 06:03:22 2007
@@ -125,7 +125,7 @@
             connection.close();
             cout << "topic_listener: normal exit" << endl;
             return 0;
-        }catch(qpid::QpidError error){
+        }catch(const std::exception& error){
             cout << "topic_listener: " << error.what() << endl;
         }
     }

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp?view=diff&rev=547241&r1=547240&r2=547241
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp Thu Jun 14 06:03:22 2007
@@ -157,7 +157,7 @@
             channel.close();
             connection.close();
             return 0;
-        }catch(qpid::QpidError error) {
+        }catch(std::exception& error) {
             std::cout << error.what() << std::endl;
         }
     }