diff options
author | Michi Henning <michi@zeroc.com> | 2005-07-04 02:06:23 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-07-04 02:06:23 +0000 |
commit | 11440f12c77b43a7d43e948e15df35c4b71c7e00 (patch) | |
tree | a93bf57b23a16939e6e1c99f42b9263191247704 /cpp/src/Ice/BasicStream.cpp | |
parent | Made Ice.ObjectImpl abstract. (diff) | |
download | ice-11440f12c77b43a7d43e948e15df35c4b71c7e00.tar.bz2 ice-11440f12c77b43a7d43e948e15df35c4b71c7e00.tar.xz ice-11440f12c77b43a7d43e948e15df35c4b71c7e00.zip |
Made Ice::Object abstract.
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index 9d9424f254c..112b492dc62 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -1519,6 +1519,15 @@ IceInternal::BasicStream::read(PatchFunc patchFunc, void* patchAddr) 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); + } + // // Try to find a factory registered for the specific type. // @@ -1542,17 +1551,6 @@ IceInternal::BasicStream::read(PatchFunc patchFunc, void* patchAddr) } // - // There isn't a static factory for Ice::Object, so check for - // that case now. We do this *after* the factory inquiries - // above so that a factory could be registered for - // "::Ice::Object". - // - if(!v && id == Ice::Object::ice_staticId()) - { - v = new ::Ice::Object; - } - - // // Last chance: check the table of static factories (i.e., // automatically generated factories for concrete classes). // |