diff options
author | Gordon Sim <gsim@apache.org> | 2008-01-09 11:54:51 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-01-09 11:54:51 +0000 |
commit | 99227773f34d344a875941f9b940cc8dfd8b7576 (patch) | |
tree | b3a6e154d20e300bacfa90ace2ad5b82e4e2be39 /cpp/src/tests/txtest.cpp | |
parent | 3f298b62a79e98c7e2e2562b4af349dbe9bbc9a2 (diff) | |
download | qpid-python-99227773f34d344a875941f9b940cc8dfd8b7576.tar.gz |
Extra level of exception handling to prevent core dumps.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@610354 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/txtest.cpp')
-rw-r--r-- | cpp/src/tests/txtest.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/tests/txtest.cpp b/cpp/src/tests/txtest.cpp index 17aef8826b..b27f75fc92 100644 --- a/cpp/src/tests/txtest.cpp +++ b/cpp/src/tests/txtest.cpp @@ -28,6 +28,7 @@ #include <algorithm> #include <iostream> +#include <memory> #include <sstream> #include <vector> @@ -112,8 +113,12 @@ struct Client ~Client() { - session.close(); - connection.close(); + try{ + session.close(); + connection.close(); + } catch(const std::exception& e) { + std::cout << e.what() << std::endl; + } } }; |