summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/exceptions/AllTests.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-12-07 22:17:44 +0000
committerMarc Laukien <marc@zeroc.com>2002-12-07 22:17:44 +0000
commitbec87e9b6a7edcbbfce5fadb520c41816143a8be (patch)
treed428b8bf9306090d456b198c87d34e0dd048a5cb /cpp/test/Ice/exceptions/AllTests.cpp
parentAMD exception cleanup (diff)
downloadice-bec87e9b6a7edcbbfce5fadb520c41816143a8be.tar.bz2
ice-bec87e9b6a7edcbbfce5fadb520c41816143a8be.tar.xz
ice-bec87e9b6a7edcbbfce5fadb520c41816143a8be.zip
more AMD exception fixes
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp66
1 files changed, 30 insertions, 36 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
index b8bbad1b017..0c800ad3fe1 100644
--- a/cpp/test/Ice/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -1216,34 +1216,31 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
cout << "ok" << endl;
- if(thrower->supportsNonIceExceptions())
+ cout << "catching unknown non-Ice exception... " << flush;
+
+ try
{
- cout << "catching unknown non-Ice exception... " << flush;
-
- try
- {
- thrower->throwNonIceException();
- test(false);
- }
- catch(const Ice::UnknownException&)
- {
- //
- // We get the an unknown exception without collocation
- // optimization.
- //
- assert(!collocated);
- }
- catch(...)
- {
- //
- // We get the original exception with collocation
- // optimization.
- //
- assert(collocated);
- }
-
- cout << "ok" << endl;
+ thrower->throwNonIceException();
+ test(false);
}
+ catch(const Ice::UnknownException&)
+ {
+ //
+ // We get the an unknown exception without collocation
+ // optimization.
+ //
+ assert(!collocated);
+ }
+ catch(...)
+ {
+ //
+ // We get the original exception with collocation
+ // optimization.
+ //
+ assert(collocated);
+ }
+
+ cout << "ok" << endl;
if(!collocated) // If the server is collocated, exception factories are not needed.
{
@@ -1415,16 +1412,13 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
cout << "ok" << endl;
- if(thrower->supportsNonIceExceptions())
- {
- cout << "catching unknown non-Ice exception with AMI... " << flush;
-
- AMI_Thrower_throwNonIceExceptionIPtr cb = new AMI_Thrower_throwNonIceExceptionI;
- thrower->throwNonIceException_async(cb);
- test(cb->check());
-
- cout << "ok" << endl;
- }
+ cout << "catching unknown non-Ice exception with AMI... " << flush;
+
+ AMI_Thrower_throwNonIceExceptionIPtr cb = new AMI_Thrower_throwNonIceExceptionI;
+ thrower->throwNonIceException_async(cb);
+ test(cb->check());
+
+ cout << "ok" << endl;
communicator->removeUserExceptionFactory("::A");
communicator->removeUserExceptionFactory("::B");