summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/interceptor/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/interceptor/Client.cpp')
-rw-r--r--cpp/test/Ice/interceptor/Client.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/cpp/test/Ice/interceptor/Client.cpp b/cpp/test/Ice/interceptor/Client.cpp
index 9aecb8e3609..0dcf101d584 100644
--- a/cpp/test/Ice/interceptor/Client.cpp
+++ b/cpp/test/Ice/interceptor/Client.cpp
@@ -318,7 +318,23 @@ Client::runAmd(const Test::MyObjectPrxPtr& prx, const AMDInterceptorIPtr& interc
test(interceptor->getLastOperation() == "amdNotExistAdd");
test(interceptor->getLastStatus() == Ice::DispatchAsync);
test(interceptor->getActualStatus() == Ice::DispatchAsync);
+
+#ifdef ICE_CPP11_MAPPING
+ try
+ {
+ rethrow_exception(interceptor->getException());
+ test(false);
+ }
+ catch(const Ice::ObjectNotExistException&)
+ {
+ }
+ catch(...)
+ {
+ test(false);
+ }
+#else
test(dynamic_cast<Ice::ObjectNotExistException*>(interceptor->getException()) != 0);
+#endif
cout << "ok" << endl;
cout << "testing system exception... " << flush;
interceptor->clear();
@@ -338,7 +354,22 @@ Client::runAmd(const Test::MyObjectPrxPtr& prx, const AMDInterceptorIPtr& interc
test(interceptor->getLastOperation() == "amdBadSystemAdd");
test(interceptor->getLastStatus() == Ice::DispatchAsync);
test(interceptor->getActualStatus() == Ice::DispatchAsync);
+#ifdef ICE_CPP11_MAPPING
+ try
+ {
+ rethrow_exception(interceptor->getException());
+ test(false);
+ }
+ catch(const MySystemException&)
+ {
+ }
+ catch(...)
+ {
+ test(false);
+ }
+#else
test(dynamic_cast<MySystemException*>(interceptor->getException()) != 0);
+#endif
cout << "ok" << endl;
return EXIT_SUCCESS;
}