From 5c52a1984357b3f0145eac2d146d44cb8e41afb4 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 14 Jun 2007 13:03:22 +0000 Subject: Fixed catch clauses to catch by const & and use std::exception for "generic" catches. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@547241 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/DtxHandlerImpl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cpp/src/qpid/broker/DtxHandlerImpl.cpp') diff --git a/cpp/src/qpid/broker/DtxHandlerImpl.cpp b/cpp/src/qpid/broker/DtxHandlerImpl.cpp index c7ed95e5d3..aeb1c3014c 100644 --- a/cpp/src/qpid/broker/DtxHandlerImpl.cpp +++ b/cpp/src/qpid/broker/DtxHandlerImpl.cpp @@ -77,7 +77,7 @@ void DtxHandlerImpl::end(const MethodContext& context, } dClient.endOk(XA_OK, context.getRequestId()); } - } catch (DtxTimeoutException e) { + } catch (const DtxTimeoutException& e) { dClient.endOk(XA_RBTIMEOUT, context.getRequestId()); } } @@ -98,7 +98,7 @@ void DtxHandlerImpl::start(const MethodContext& context, 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 @@ void DtxHandlerImpl::prepare(const MethodContext& context, 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 @@ void DtxHandlerImpl::commit(const MethodContext& context, 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 @@ void DtxHandlerImpl::rollback(const MethodContext& context, try { broker.getDtxManager().rollback(xid); cClient.rollbackOk(XA_OK, context.getRequestId()); - } catch (DtxTimeoutException e) { + } catch (const DtxTimeoutException& e) { cClient.rollbackOk(XA_RBTIMEOUT, context.getRequestId()); } } -- cgit v1.2.1