summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Exception.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-06-11 18:53:17 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-06-11 18:53:17 +0200
commit27b1f7cc1b061fbf3a1582963d0af08d5839d480 (patch)
treec93c4a0c885ec941ec33116dd2f5683042d96a34 /cpp/src/Ice/Exception.cpp
parentJava port (diff)
downloadice-27b1f7cc1b061fbf3a1582963d0af08d5839d480.tar.bz2
ice-27b1f7cc1b061fbf3a1582963d0af08d5839d480.tar.xz
ice-27b1f7cc1b061fbf3a1582963d0af08d5839d480.zip
Support for optionals
Diffstat (limited to 'cpp/src/Ice/Exception.cpp')
-rw-r--r--cpp/src/Ice/Exception.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp
index a5b2aafa246..002851f917d 100644
--- a/cpp/src/Ice/Exception.cpp
+++ b/cpp/src/Ice/Exception.cpp
@@ -26,11 +26,11 @@ namespace Ex
{
void
-throwUOE(const string& expectedType, const string& actualType)
+throwUOE(const string& expectedType, const string& type)
{
throw Ice::UnexpectedObjectException(__FILE__, __LINE__,
- "expected element of type `" + expectedType + "' but received '" + actualType,
- actualType, expectedType);
+ "expected element of type `" + expectedType + "' but received '" +
+ type, type, expectedType);
}
void
@@ -591,6 +591,17 @@ Ice::NoObjectFactoryException::ice_print(ostream& out) const
}
void
+Ice::NoExceptionFactoryException::ice_print(ostream& out) const
+{
+ Exception::ice_print(out);
+ out << ":\nprotocol error: no suitable exception factory found for `" << type << "'";
+ if(!reason.empty())
+ {
+ out << ":\n" << reason;
+ }
+}
+
+void
Ice::UnexpectedObjectException::ice_print(ostream& out) const
{
Exception::ice_print(out);