summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/exceptions/AllTests.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-04-19 19:32:21 +0000
committerMarc Laukien <marc@zeroc.com>2002-04-19 19:32:21 +0000
commit101fc61aa6768b1b9fcbc9911bf83509b221d403 (patch)
treea31861a676d9cf06700aa8c3d3508d867a02882f /cpp/test/Ice/exceptions/AllTests.cpp
parent#ifdef test that causes problems under Linux (diff)
downloadice-101fc61aa6768b1b9fcbc9911bf83509b221d403.tar.bz2
ice-101fc61aa6768b1b9fcbc9911bf83509b221d403.tar.xz
ice-101fc61aa6768b1b9fcbc9911bf83509b221d403.zip
added members to object, facet, and operation not exist exceptions
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
index 7d7881c70dc..fc43e5b5a21 100644
--- a/cpp/test/Ice/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -328,6 +328,64 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
cout << "ok" << endl;
}
+ cout << "catching object not exist exception... " << flush;
+
+ Ice::Identity id = Ice::stringToIdentity("does not exist");
+ try
+ {
+ ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower->ice_newIdentity(id));
+ thrower2->ice_ping();
+ test(false);
+ }
+ catch (const Ice::ObjectNotExistException& ex)
+ {
+ test(ex.identity == id);
+ }
+ catch (...)
+ {
+ test(false);
+ }
+
+ cout << "ok" << endl;
+
+ cout << "catching facet not exist exception... " << flush;
+
+ try
+ {
+ ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower, "no such facet");
+ thrower2->ice_ping();
+ test(false);
+ }
+ catch (const Ice::FacetNotExistException& ex)
+ {
+ test(ex.facet == "no such facet");
+ }
+ catch (...)
+ {
+ test(false);
+ }
+
+ cout << "ok" << endl;
+
+ cout << "catching operation not exist exception... " << flush;
+
+ try
+ {
+ WrongOperationPrx thrower2 = WrongOperationPrx::uncheckedCast(thrower);
+ thrower2->noSuchOperation();
+ test(false);
+ }
+ catch (const Ice::OperationNotExistException& ex)
+ {
+ test(ex.operation == "noSuchOperation");
+ }
+ catch (...)
+ {
+ test(false);
+ }
+
+ cout << "ok" << endl;
+
cout << "catching unknown local exception... " << flush;
try