diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-10-29 12:21:53 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-10-29 12:21:53 +0100 |
commit | 881f18ef1ef829511f2002c08ed855f032184e6a (patch) | |
tree | c0a33e16c0df239e5af85ff489caa00e0eb82daa /cpp/src | |
parent | More UMR fixes (diff) | |
download | ice-881f18ef1ef829511f2002c08ed855f032184e6a.tar.bz2 ice-881f18ef1ef829511f2002c08ed855f032184e6a.tar.xz ice-881f18ef1ef829511f2002c08ed855f032184e6a.zip |
Minor core, test and demo fixes
- Fixed C# value demo to use sliced format
- Fixed Ice core to throw NoObjectFactoryException/UnknownUserException instead
or MarshalException when compact format is used an no factory is found.
- Fixed minor unitialized memory reads.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 14 | ||||
-rw-r--r-- | cpp/src/Ice/GC.cpp | 1 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index cd32101f980..b4f2753802f 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -2887,9 +2887,17 @@ IceInternal::BasicStream::EncapsDecoder::skipSlice() } else { - throw MarshalException(__FILE__, - __LINE__, - "compact format prevents slicing (the sender should use the sliced format instead)"); + if(_sliceType == ObjectSlice) + { + throw NoObjectFactoryException( + __FILE__, __LINE__, + "compact format prevents slicing (the sender should use the sliced format instead)", + _typeId); + } + else + { + throw UnknownUserException(__FILE__, __LINE__, _typeId.substr(2)); + } } if(_encaps->encoding != Encoding_1_0) diff --git a/cpp/src/Ice/GC.cpp b/cpp/src/Ice/GC.cpp index daf08851e72..7d747cf9ae0 100644 --- a/cpp/src/Ice/GC.cpp +++ b/cpp/src/Ice/GC.cpp @@ -391,7 +391,6 @@ IceInternal::GC::updateObserver(const CommunicatorObserverPtr& observer) Monitor<Mutex>::Lock sync(*this); if(!observer) { - assert(!_communicatorObserver); // Communicator is destroyed. return; } diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 7a93d08ebb4..6ba84c8e6b4 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -778,7 +778,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) emitUpcall(base, "(__file, __line)", true); if(p->hasDefaultValues()) { - C << nl << ", "; + C << ", "; writeDataMemberInitializers(C, dataMembers, _useWstring); } C.dec(); |