summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Outgoing.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-09-27 15:31:04 +0000
committerMarc Laukien <marc@zeroc.com>2002-09-27 15:31:04 +0000
commit6f9d449ef67cb3d5c3a1778d7c20d0338e2635b6 (patch)
tree9dba8b5850cbf61c8330c3d405b411a1ee5bda18 /cpp/src/Ice/Outgoing.cpp
parentadded AbortException to IcePatch.ice with support in IcePatch/ClientUtil (diff)
downloadice-6f9d449ef67cb3d5c3a1778d7c20d0338e2635b6.tar.bz2
ice-6f9d449ef67cb3d5c3a1778d7c20d0338e2635b6.tar.xz
ice-6f9d449ef67cb3d5c3a1778d7c20d0338e2635b6.zip
added RequestFailedException
Diffstat (limited to 'cpp/src/Ice/Outgoing.cpp')
-rw-r--r--cpp/src/Ice/Outgoing.cpp59
1 files changed, 35 insertions, 24 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp
index e5f2dd52318..dd207ca36f7 100644
--- a/cpp/src/Ice/Outgoing.cpp
+++ b/cpp/src/Ice/Outgoing.cpp
@@ -247,41 +247,52 @@ IceInternal::Outgoing::finished(BasicStream& is)
}
case DispatchObjectNotExist:
- {
- _state = StateLocalException;
- // 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->id = ident;
- _exception = auto_ptr<LocalException>(ex);
- break;
- }
-
case DispatchFacetNotExist:
+ case DispatchOperationNotExist:
{
_state = StateLocalException;
// Don't do _is.read(ex->facet), as this operation
// might throw exceptions. In such case ex would leak.
+ Identity ident;
+ ident.__read(&_is);
vector<string> facet;
_is.read(facet);
- FacetNotExistException* ex = new FacetNotExistException(__FILE__, __LINE__);
- ex->facet = facet;
- _exception = auto_ptr<LocalException>(ex);
- break;
- }
-
- case DispatchOperationNotExist:
- {
- _state = StateLocalException;
- // 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__);
+
+ RequestFailedException* ex;
+ switch(static_cast<DispatchStatus>(status))
+ {
+ case DispatchObjectNotExist:
+ {
+ ex = new ObjectNotExistException(__FILE__, __LINE__);
+ break;
+ }
+
+ case DispatchFacetNotExist:
+ {
+ ex = new FacetNotExistException(__FILE__, __LINE__);
+ break;
+ }
+
+ case DispatchOperationNotExist:
+ {
+ ex = new OperationNotExistException(__FILE__, __LINE__);
+ break;
+ }
+
+ default:
+ {
+ assert(false);
+ break;
+ }
+ }
+
+ ex->id = ident;
+ ex->facet = facet;
ex->operation = operation;
_exception = auto_ptr<LocalException>(ex);
+
break;
}