diff options
author | Alan Conway <aconway@apache.org> | 2007-06-14 13:03:22 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-06-14 13:03:22 +0000 |
commit | cd16b39d7a138d4ff08a25bfe62f9e682a000aec (patch) | |
tree | c6d3b71e860f321879206904681543cac340b8de /qpid/cpp/src | |
parent | 31f720ecc6bed95ffa6b7205f70614077dc3f513 (diff) | |
download | qpid-python-cd16b39d7a138d4ff08a25bfe62f9e682a000aec.tar.gz |
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@547241 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r-- | qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp | 10 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/echo_service.cpp | 4 | ||||
-rw-r--r-- | qpid/cpp/src/tests/interop_runner.cpp | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/topic_listener.cpp | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/topic_publisher.cpp | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp b/qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp index c7ed95e5d3..aeb1c3014c 100644 --- a/qpid/cpp/src/qpid/broker/DtxHandlerImpl.cpp +++ b/qpid/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()); } } diff --git a/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp b/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp index bb53e45a83..69c92cc2c4 100644 --- a/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp +++ b/qpid/cpp/src/qpid/sys/apr/LFProcessor.cpp @@ -136,7 +136,7 @@ void LFProcessor::run(){ session->stopProcessing(); } } - }catch(std::exception e){ + }catch(const std::exception& e){ QPID_LOG(error, e.what()); } } diff --git a/qpid/cpp/src/tests/echo_service.cpp b/qpid/cpp/src/tests/echo_service.cpp index 09cf1e01bb..c4f1f0477a 100644 --- a/qpid/cpp/src/tests/echo_service.cpp +++ b/qpid/cpp/src/tests/echo_service.cpp @@ -135,7 +135,7 @@ int main(int argc, char** argv){ } connection.close(); - } catch(qpid::QpidError error) { + } catch(std::exception& error) { std::cout << error.what() << std::endl; } } else { @@ -164,7 +164,7 @@ int main(int argc, char** argv){ channel.run(); connection.close(); - } catch(qpid::QpidError error) { + } catch(std::exception& error) { std::cout << error.what() << std::endl; } } diff --git a/qpid/cpp/src/tests/interop_runner.cpp b/qpid/cpp/src/tests/interop_runner.cpp index 26639ede17..7d40eeedb1 100644 --- a/qpid/cpp/src/tests/interop_runner.cpp +++ b/qpid/cpp/src/tests/interop_runner.cpp @@ -116,7 +116,7 @@ int main(int argc, char** argv){ channel.run(); connection.close(); - } catch(qpid::Exception error) { + } catch(const std::exception& error) { std::cout << error.what() << std::endl; } } diff --git a/qpid/cpp/src/tests/topic_listener.cpp b/qpid/cpp/src/tests/topic_listener.cpp index 8af8f007d9..9fb3ee8371 100644 --- a/qpid/cpp/src/tests/topic_listener.cpp +++ b/qpid/cpp/src/tests/topic_listener.cpp @@ -125,7 +125,7 @@ int main(int argc, char** argv){ 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; } } diff --git a/qpid/cpp/src/tests/topic_publisher.cpp b/qpid/cpp/src/tests/topic_publisher.cpp index 7c16dd71f3..9384053e68 100644 --- a/qpid/cpp/src/tests/topic_publisher.cpp +++ b/qpid/cpp/src/tests/topic_publisher.cpp @@ -157,7 +157,7 @@ int main(int argc, char** argv) { channel.close(); connection.close(); return 0; - }catch(qpid::QpidError error) { + }catch(std::exception& error) { std::cout << error.what() << std::endl; } } |