You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jr...@apache.org on 2018/05/13 16:04:35 UTC

[3/4] qpid-cpp git commit: QPID-8186 Use const ref when catching exceptions

QPID-8186 Use const ref when catching exceptions


Project: http://git-wip-us.apache.org/repos/asf/qpid-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-cpp/commit/8b09d246
Tree: http://git-wip-us.apache.org/repos/asf/qpid-cpp/tree/8b09d246
Diff: http://git-wip-us.apache.org/repos/asf/qpid-cpp/diff/8b09d246

Branch: refs/heads/master
Commit: 8b09d246f2529ea59809cac743e55af3920b4895
Parents: 706b5f3
Author: Chris Richardson <ch...@fourc.eu>
Authored: Thu May 10 11:45:42 2018 +0200
Committer: Justin Ross <jr...@apache.org>
Committed: Sat May 12 07:30:42 2018 -0700

----------------------------------------------------------------------
 src/qpid/sys/posix/SocketAddress.cpp | 4 ++--
 src/tests/AclHost.cpp                | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/8b09d246/src/qpid/sys/posix/SocketAddress.cpp
----------------------------------------------------------------------
diff --git a/src/qpid/sys/posix/SocketAddress.cpp b/src/qpid/sys/posix/SocketAddress.cpp
index 20cce5e..a80cc75 100644
--- a/src/qpid/sys/posix/SocketAddress.cpp
+++ b/src/qpid/sys/posix/SocketAddress.cpp
@@ -205,11 +205,11 @@ bool SocketAddress::isComparable(const SocketAddress& hiPeer) const {
                 return false;
             }
             return true;
-        } catch (Exception) {
+        } catch (const Exception&) {
             // failed to resolve hi
             return false;
         }
-    } catch (Exception) {
+    } catch (const Exception&) {
         // failed to resolve lo
         return false;
     }

http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/8b09d246/src/tests/AclHost.cpp
----------------------------------------------------------------------
diff --git a/src/tests/AclHost.cpp b/src/tests/AclHost.cpp
index 7d60c5a..24614d6 100644
--- a/src/tests/AclHost.cpp
+++ b/src/tests/AclHost.cpp
@@ -39,14 +39,14 @@ QPID_AUTO_TEST_SUITE(AclHostTestSuite)
   try { \
     sys::SocketAddress sa("1.1.1.1", ""); \
     sa.firstAddress(); \
-} catch (qpid::Exception) { \
+} catch (const qpid::Exception&) { \
     haveIPv4 = false; \
 } \
   bool haveIPv6(true); \
   try { \
     sys::SocketAddress sa("::1", ""); \
     sa.firstAddress(); \
-} catch (qpid::Exception) { \
+} catch (const qpid::Exception&) { \
     haveIPv6 = false; \
 } \
 (void) haveIPv4; \


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org