diff options
author | Marc Laukien <marc@zeroc.com> | 2002-04-19 19:32:21 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-04-19 19:32:21 +0000 |
commit | 101fc61aa6768b1b9fcbc9911bf83509b221d403 (patch) | |
tree | a31861a676d9cf06700aa8c3d3508d867a02882f /cpp/src/Ice/Outgoing.cpp | |
parent | #ifdef test that causes problems under Linux (diff) | |
download | ice-101fc61aa6768b1b9fcbc9911bf83509b221d403.tar.bz2 ice-101fc61aa6768b1b9fcbc9911bf83509b221d403.tar.xz ice-101fc61aa6768b1b9fcbc9911bf83509b221d403.zip |
added members to object, facet, and operation not exist exceptions
Diffstat (limited to 'cpp/src/Ice/Outgoing.cpp')
-rw-r--r-- | cpp/src/Ice/Outgoing.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index 6daf8ae2c16..e5f4c9bd672 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -12,7 +12,7 @@ #include <Ice/Object.h> #include <Ice/Connection.h> #include <Ice/Reference.h> -#include <Ice/Exception.h> +#include <Ice/LocalException.h> #include <Ice/Instance.h> using namespace std; @@ -249,21 +249,39 @@ IceInternal::Outgoing::finished(BasicStream& is) case DispatchObjectNotExist: { _state = StateLocalException; - _exception = auto_ptr<LocalException>(new ObjectNotExistException(__FILE__, __LINE__)); + // Don't do ex->identity.read(_is), as this operation + // might throw exceptions. In such case ex would leak. + Identity ident; + ident.__read(&_is); + ObjectNotExistException* ex = new ObjectNotExistException(__FILE__, __LINE__); + ex->identity = ident; + _exception = auto_ptr<LocalException>(ex); break; } case DispatchFacetNotExist: { _state = StateLocalException; - _exception = auto_ptr<LocalException>(new FacetNotExistException(__FILE__, __LINE__)); + // Don't do _is.read(ex->facet), as this operation + // might throw exceptions. In such case ex would leak. + string facet; + _is.read(facet); + FacetNotExistException* ex = new FacetNotExistException(__FILE__, __LINE__); + ex->facet = facet; + _exception = auto_ptr<LocalException>(ex); break; } case DispatchOperationNotExist: { _state = StateLocalException; - _exception = auto_ptr<LocalException>(new OperationNotExistException(__FILE__, __LINE__)); + // Don't do _is.read(ex->operation), as this operation + // might throw exceptions. In such case ex would leak. + string operation; + _is.read(operation); + OperationNotExistException* ex = new OperationNotExistException(__FILE__, __LINE__); + ex->operation = operation; + _exception = auto_ptr<LocalException>(ex); break; } |