summaryrefslogtreecommitdiff
path: root/cppe/src
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-09-08 05:01:02 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-09-08 05:01:02 +0000
commit96f03676876c78b4bfe1132919fb8dbedbf7efe8 (patch)
treec31dd885938bc808920c39340d17c9b681035df6 /cppe/src
parenthttp://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=353 (diff)
downloadice-96f03676876c78b4bfe1132919fb8dbedbf7efe8.tar.bz2
ice-96f03676876c78b4bfe1132919fb8dbedbf7efe8.tar.xz
ice-96f03676876c78b4bfe1132919fb8dbedbf7efe8.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=353
Diffstat (limited to 'cppe/src')
-rw-r--r--cppe/src/IceE/Object.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/cppe/src/IceE/Object.cpp b/cppe/src/IceE/Object.cpp
index 0f0b93dc16e..7346597ffd4 100644
--- a/cppe/src/IceE/Object.cpp
+++ b/cppe/src/IceE/Object.cpp
@@ -10,6 +10,7 @@
#include <IceE/Object.h>
#include <IceE/Incoming.h>
#include <IceE/LocalException.h>
+#include <IceE/SafeStdio.h>
using namespace std;
using namespace Ice;
@@ -163,6 +164,36 @@ Ice::Object::__dispatch(Incoming& in, const Current& current)
return DispatchOperationNotExist;
}
+static const char*
+operationModeToString(OperationMode mode)
+{
+ switch(mode)
+ {
+ case Normal:
+ return "::Ice::Normal";
+
+ case Nonmutating:
+ return "::Ice::Nonmutating";
+
+ case Idempotent:
+ return "::Ice::Idempotent";
+ }
+
+ return "???";
+}
+
+void
+Ice::Object::__checkMode(OperationMode expected, OperationMode received)
+{
+ if(expected != received)
+ {
+ Ice::MarshalException ex(__FILE__, __LINE__);
+ ex.reason = Ice::printfToString("unexpected operation mode. expected = %s received = %s",
+ operationModeToString(expected), operationModeToString(received));
+ throw ex;
+ }
+}
+
DispatchStatus
Ice::Blobject::__dispatch(Incoming& in, const Current& current)
{