Skip to content

Commit

Permalink
QPID-8186 Use const ref when catching exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrichardson77 authored and ssorj committed May 12, 2018
1 parent 706b5f3 commit 8b09d24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/qpid/sys/posix/SocketAddress.cpp
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/tests/AclHost.cpp
Expand Up @@ -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; \
Expand Down

0 comments on commit 8b09d24

Please sign in to comment.