diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-09-08 05:01:02 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-09-08 05:01:02 +0000 |
commit | 96f03676876c78b4bfe1132919fb8dbedbf7efe8 (patch) | |
tree | c31dd885938bc808920c39340d17c9b681035df6 /cppe/src/IceE/Object.cpp | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=353 (diff) | |
download | ice-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/IceE/Object.cpp')
-rw-r--r-- | cppe/src/IceE/Object.cpp | 31 |
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) { |