summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-06-12 19:57:04 +0000
committerAlan Conway <aconway@apache.org>2008-06-12 19:57:04 +0000
commit8f0d5eda53cce94c670c1140018c1bffa32bd066 (patch)
tree76d57c02c09e106e6acbef16561bbf66c3d02b43 /qpid/cpp
parentec2a87c8b4d5873c3ea4e88e7c02e1b6200400ea (diff)
downloadqpid-python-8f0d5eda53cce94c670c1140018c1bffa32bd066.tar.gz
Fix test error.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@667215 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/tests/exception_test.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/qpid/cpp/src/tests/exception_test.cpp b/qpid/cpp/src/tests/exception_test.cpp
index a656e0cf1a..1cbe35fff4 100644
--- a/qpid/cpp/src/tests/exception_test.cpp
+++ b/qpid/cpp/src/tests/exception_test.cpp
@@ -28,6 +28,9 @@
QPID_AUTO_TEST_SUITE(exception_test)
+// FIXME aconway 2008-06-12: need to update our exception handling to
+// 0-10 handling and extend this test to provoke all the exceptional
+// conditions we know of and verify the correct exception is thrown.
using namespace std;
using namespace qpid;
@@ -51,10 +54,10 @@ struct Catcher : public Runnable {
try { f(); }
catch(const Ex& e) {
caught=true;
- BOOST_MESSAGE(string("Caught expected exception: ")+e.what());
+ BOOST_MESSAGE(string("Caught expected exception: ")+e.what()+"["+typeid(e).name()+"]");
}
catch(const std::exception& e) {
- BOOST_ERROR(string("Bad exception: ")+e.what());
+ BOOST_ERROR(string("Bad exception: ")+e.what()+"["+typeid(e).name()+"] expected: "+typeid(Ex).name());
}
catch(...) {
BOOST_ERROR(string("Bad exception: unknown"));
@@ -75,7 +78,7 @@ QPID_AUTO_TEST_CASE(DisconnectedPop) {
ProxyConnection c(fix.broker->getPort());
fix.session.queueDeclare(arg::queue="q");
fix.subs.subscribe(fix.lq, "q");
- Catcher<ClosedException> pop(bind(&LocalQueue::pop, boost::ref(fix.lq)));
+ Catcher<Exception> pop(bind(&LocalQueue::pop, boost::ref(fix.lq)));
fix.connection.proxy.close();
BOOST_CHECK(pop.join());
}