[omniORB] System Exceptions in GIOP 1.1

Duncan Grisby duncan at grisby.org
Wed May 5 16:37:38 BST 2004

On Wednesday 5 May, "Paul Haesler" wrote:

> giopImpl11::sendSystemException in 4.0.3 has 
> a serious bug that causes garbage packets to be 
> sent for System Exceptions.  By comparing with the 
> equivalent giopImpl12 code (which works), you can 
> clearly see that the buffer is not being initialised.  
> The missing line is:
> 	outputNewMessage(g);

Thanks for finding that. I'm surprised the bug had survived that
long. I guess very few people use GIOP 1.1 -- most things are either
1.0 or 1.2. I've checked in the fix.

> I do have a couple of stylistic comments though, which
> you are welcome to ignore.

I will... ;-)

> Firstly, I am one of those fuddy-duddies who thinks that
> matching pairs of braces should be vertically aligned, but
> I recognise this as a religious issue and I'm not going to
> make a big deal about it. :)

I definitely don't want to go into that religious war.

> Secondly, I am uncomfortable with the use of the >>= 
> operator to insert into cdrStreams.  I really think you should
> be using << to be consistent with other standard library
> streams, and your own logger streams.  The way you
> use >>= isn't even consistent with CORBA's rather bizarre
> Any insertion/extraction operators - surely the cdrStream
> should at least be on the left.

The cdrStream insertion operators are intentionally different from the
iostream (and similar) operators to prevent confusion between the two
-- they behave differently, so they are made to look different. Using
>>= also avoids the good old confusion about whether cout << 1 << 2
prints 12 or 4. Regardless as to whether anyone thinks the current
scheme is sensible or not, I'm sure you'd agree that it's not sensible
to consider changing them all now.



 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --

More information about the omniORB-list mailing list