summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/exceptions
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/exceptions')
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp27
-rw-r--r--cpp/test/Ice/exceptions/Test.ice2
-rw-r--r--cpp/test/Ice/exceptions/TestAMD.ice2
-rw-r--r--cpp/test/Ice/exceptions/TestAMDI.cpp7
-rw-r--r--cpp/test/Ice/exceptions/TestAMDI.h3
-rw-r--r--cpp/test/Ice/exceptions/TestI.cpp6
-rw-r--r--cpp/test/Ice/exceptions/TestI.h2
7 files changed, 49 insertions, 0 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
index d08c104e2db..d9033a0f76a 100644
--- a/cpp/test/Ice/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -841,6 +841,9 @@ public:
catch(const Ice::UnknownLocalException&)
{
}
+ catch(const Ice::OperationNotExistException&)
+ {
+ }
catch(...)
{
test(false);
@@ -1416,6 +1419,21 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
{
test(false);
}
+ try
+ {
+ thrower->throwLocalExceptionIdempotent();
+ test(false);
+ }
+ catch(const Ice::UnknownLocalException&)
+ {
+ }
+ catch(const Ice::OperationNotExistException&)
+ {
+ }
+ catch(...)
+ {
+ test(false);
+ }
cout << "ok" << endl;
@@ -1770,6 +1788,15 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
cb->check();
}
+ {
+ CallbackPtr cb = new Callback;
+ Callback_Thrower_throwLocalExceptionIdempotentPtr callback =
+ newCallback_Thrower_throwLocalExceptionIdempotent(cb, &Callback::response,
+ &Callback::exception_LocalException);
+ thrower->begin_throwLocalExceptionIdempotent(callback);
+ cb->check();
+ }
+
cout << "ok" << endl;
cout << "catching unknown non-Ice exception with new AMI mapping... " << flush;
diff --git a/cpp/test/Ice/exceptions/Test.ice b/cpp/test/Ice/exceptions/Test.ice
index 5338dac2414..895e99894b6 100644
--- a/cpp/test/Ice/exceptions/Test.ice
+++ b/cpp/test/Ice/exceptions/Test.ice
@@ -91,6 +91,8 @@ module Mod
void throwNonIceException();
void throwAssertException();
+ idempotent void throwLocalExceptionIdempotent();
+
void throwAfterResponse();
void throwAfterException() throws A;
};
diff --git a/cpp/test/Ice/exceptions/TestAMD.ice b/cpp/test/Ice/exceptions/TestAMD.ice
index a5c4353e65b..ee03c14449b 100644
--- a/cpp/test/Ice/exceptions/TestAMD.ice
+++ b/cpp/test/Ice/exceptions/TestAMD.ice
@@ -92,6 +92,8 @@ module Mod
void throwNonIceException();
void throwAssertException();
+ idempotent void throwLocalExceptionIdempotent();
+
void throwAfterResponse();
void throwAfterException() throws A;
diff --git a/cpp/test/Ice/exceptions/TestAMDI.cpp b/cpp/test/Ice/exceptions/TestAMDI.cpp
index 266f020fc4e..b701658ee80 100644
--- a/cpp/test/Ice/exceptions/TestAMDI.cpp
+++ b/cpp/test/Ice/exceptions/TestAMDI.cpp
@@ -196,6 +196,13 @@ ThrowerI::throwAssertException_async(const AMD_Thrower_throwAssertExceptionPtr&,
}
void
+ThrowerI::throwLocalExceptionIdempotent_async(const AMD_Thrower_throwLocalExceptionIdempotentPtr& cb,
+ const Ice::Current&)
+{
+ cb->ice_exception(Ice::TimeoutException(__FILE__, __LINE__));
+}
+
+void
ThrowerI::throwAfterResponse_async(const AMD_Thrower_throwAfterResponsePtr& cb, const Ice::Current&)
{
cb->ice_response();
diff --git a/cpp/test/Ice/exceptions/TestAMDI.h b/cpp/test/Ice/exceptions/TestAMDI.h
index 3143d44ab61..8e7e79294b0 100644
--- a/cpp/test/Ice/exceptions/TestAMDI.h
+++ b/cpp/test/Ice/exceptions/TestAMDI.h
@@ -59,6 +59,9 @@ public:
virtual void throwAssertException_async(const Test::AMD_Thrower_throwAssertExceptionPtr&,
const Ice::Current&);
+ virtual void throwLocalExceptionIdempotent_async(const Test::AMD_Thrower_throwLocalExceptionIdempotentPtr&,
+ const Ice::Current&);
+
virtual void throwAfterResponse_async(const Test::AMD_Thrower_throwAfterResponsePtr&, const Ice::Current&);
virtual void throwAfterException_async(const Test::AMD_Thrower_throwAfterExceptionPtr&, const Ice::Current&);
diff --git a/cpp/test/Ice/exceptions/TestI.cpp b/cpp/test/Ice/exceptions/TestI.cpp
index 56797a7c5c7..bf65bfd72ae 100644
--- a/cpp/test/Ice/exceptions/TestI.cpp
+++ b/cpp/test/Ice/exceptions/TestI.cpp
@@ -153,6 +153,12 @@ ThrowerI::throwAssertException(const Ice::Current&)
}
void
+ThrowerI::throwLocalExceptionIdempotent(const Ice::Current&)
+{
+ throw Ice::TimeoutException(__FILE__, __LINE__);
+}
+
+void
ThrowerI::throwAfterResponse(const Ice::Current&)
{
//
diff --git a/cpp/test/Ice/exceptions/TestI.h b/cpp/test/Ice/exceptions/TestI.h
index cd8c2121a89..731c16bcf9e 100644
--- a/cpp/test/Ice/exceptions/TestI.h
+++ b/cpp/test/Ice/exceptions/TestI.h
@@ -41,6 +41,8 @@ public:
virtual void throwNonIceException(const Ice::Current&);
virtual void throwAssertException(const Ice::Current&);
+ virtual void throwLocalExceptionIdempotent(const Ice::Current&);
+
virtual void throwAfterResponse(const Ice::Current&);
virtual void throwAfterException(const Ice::Current&);
};