summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/interceptor/Client.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-01-08 21:10:14 +0100
committerJose <jose@zeroc.com>2016-01-08 21:10:14 +0100
commit93ab5a8f08970ad49c6f973b965b8fbefb63882f (patch)
tree18c00abdc514ca90a7ab6e1acc5b350847843681 /cpp/test/Ice/interceptor/Client.cpp
parentC++98 test minor build fix (diff)
downloadice-93ab5a8f08970ad49c6f973b965b8fbefb63882f.tar.bz2
ice-93ab5a8f08970ad49c6f973b965b8fbefb63882f.tar.xz
ice-93ab5a8f08970ad49c6f973b965b8fbefb63882f.zip
C++11 fix Exception::ice_clone to use exception_ptr
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;
}