diff options
author | Michi Henning <michi@zeroc.com> | 2005-07-15 01:50:32 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-07-15 01:50:32 +0000 |
commit | 0275da85d4593a8db0600a160d93dd9626d5dbbc (patch) | |
tree | ac583326d499bc739c2c4c94b6c99d2204018f28 /cpp/src/Ice/BasicStream.cpp | |
parent | fixed missing int->char conversion (diff) | |
download | ice-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.cpp | 11 |
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 |