summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/Object.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-07-27 15:15:19 +0000
committerBernard Normier <bernard@zeroc.com>2006-07-27 15:15:19 +0000
commitd67d2526c13c09cbcf34cd711c5c7fd8d3a6ee8b (patch)
treedf92440ac4f3f286042368b96f29ada9250a2cd5 /cppe/src/IceE/Object.cpp
parentWin32 fix (diff)
downloadice-d67d2526c13c09cbcf34cd711c5c7fd8d3a6ee8b.tar.bz2
ice-d67d2526c13c09cbcf34cd711c5c7fd8d3a6ee8b.tar.xz
ice-d67d2526c13c09cbcf34cd711c5c7fd8d3a6ee8b.zip
checkMode enhancement
Diffstat (limited to 'cppe/src/IceE/Object.cpp')
-rw-r--r--cppe/src/IceE/Object.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/cppe/src/IceE/Object.cpp b/cppe/src/IceE/Object.cpp
index 7d9aeff9764..7924550be3e 100644
--- a/cppe/src/IceE/Object.cpp
+++ b/cppe/src/IceE/Object.cpp
@@ -186,10 +186,26 @@ void
Ice::Object::__invalidMode(OperationMode expected, OperationMode received)
{
assert(expected != received);
- Ice::MarshalException ex(__FILE__, __LINE__);
- ex.reason = Ice::printfToString("unexpected operation mode. expected = %s received = %s",
- operationModeToString(expected), operationModeToString(received));
- throw ex;
+
+ if(expected == Idempotent && received == Nonmutating)
+ {
+ //
+ // Fine: typically an old client still using the deprecated nonmutating keyword
+ //
+
+ //
+ // Note that expected == Nonmutating and received == Idempotent is not ok:
+ // the server may still use the deprecated nonmutating keyword to detect updates
+ // and the client should not break this (deprecated) feature.
+ //
+ }
+ else
+ {
+ Ice::MarshalException ex(__FILE__, __LINE__);
+ ex.reason = Ice::printfToString("unexpected operation mode. expected = %s received = %s",
+ operationModeToString(expected), operationModeToString(received));
+ throw ex;
+ }
}
DispatchStatus