summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/BasicStream.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2005-07-15 01:50:32 +0000
committerMichi Henning <michi@zeroc.com>2005-07-15 01:50:32 +0000
commit0275da85d4593a8db0600a160d93dd9626d5dbbc (patch)
treeac583326d499bc739c2c4c94b6c99d2204018f28 /cpp/src/Ice/BasicStream.cpp
parentfixed missing int->char conversion (diff)
downloadice-0275da85d4593a8db0600a160d93dd9626d5dbbc.tar.bz2
ice-0275da85d4593a8db0600a160d93dd9626d5dbbc.tar.xz
ice-0275da85d4593a8db0600a160d93dd9626d5dbbc.zip
Improved excpetion info for NoObjectFactoryException. When sliced to
Object, the original most derived type ID is now reported.
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r--cpp/src/Ice/BasicStream.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp
index 112b492dc62..ac5d470f146 100644
--- a/cpp/src/Ice/BasicStream.cpp
+++ b/cpp/src/Ice/BasicStream.cpp
@@ -1514,18 +1514,20 @@ IceInternal::BasicStream::read(PatchFunc patchFunc, void* patchAddr)
}
assert(index > 0);
+ string mostDerivedId;
+ readTypeId(mostDerivedId);
+ string id = mostDerivedId;
while(true)
{
- string id;
- readTypeId(id);
-
//
// If we slice all the way down to Ice::Object, we throw
// because Ice::Object is abstract.
//
if(id == Ice::Object::ice_staticId())
{
- throw NoObjectFactoryException(__FILE__, __LINE__, "class sliced to ::Ice::Object, which is abstract", id);
+ throw NoObjectFactoryException(__FILE__, __LINE__,
+ "class sliced to ::Ice::Object, which is abstract",
+ mostDerivedId);
}
//
@@ -1581,6 +1583,7 @@ IceInternal::BasicStream::read(PatchFunc patchFunc, void* patchAddr)
traceSlicing("class", id, _slicingCat, _instance->logger());
}
skipSlice(); // Slice off this derived part -- we don't understand it.
+ readTypeId(id); // Read next id for next iteration.
continue;
}
else