[omniORB] SystemException::NP_minorString() returns 0
Duncan Grisby
duncan at grisby.org
Tue Sep 28 12:53:31 BST 2004
On Saturday 25 September, Alex Tingle wrote:
> SystemException::NP_minorString() returns 0 when the minor string is not
> found in the lookup table. This makes using it a bit awkward. Would it
> hurt to return "" or "unknown minor string" instead?
Yes, it would hurt. Several places in the ORB rely on it returning 0
when there's no string available. I don't know how many other people
might have application code using it.
> Right now I have to test the return value before I can use it:
>
> const char* minor( ex->NP_minorString() );
> if(minor)
> {
> cout<<minor<<endl;
> }
>
> rather than, simply
>
> cout<<ex->NP_minorString()<<endl;
In all the iostream implementations I know, the latter will just print
(null) or something similar, so it's not especially harmful.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list