You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2008/06/12 21:57:04 UTC

svn commit: r667215 - /incubator/qpid/trunk/qpid/cpp/src/tests/exception_test.cpp

Author: aconway
Date: Thu Jun 12 12:57:04 2008
New Revision: 667215

URL: http://svn.apache.org/viewvc?rev=667215&view=rev
Log:
Fix test error.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/tests/exception_test.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/exception_test.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/exception_test.cpp?rev=667215&r1=667214&r2=667215&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/exception_test.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/exception_test.cpp Thu Jun 12 12:57:04 2008
@@ -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 @@
         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 @@
     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());
 }