[omniORB] SystemException::NP_minorString() returns 0

renny.koshy at rubixinfotech.com renny.koshy at rubixinfotech.com
Tue Sep 28 09:51:17 BST 2004


I tend to agree with Alex's point of view on this...  If the function is 
supposed to return a string, then returning NULL is probably not a great 
idea.

I would tend to say that I've taken the approach in our software 
components that in general, if something returns a string, it's safer to 
return an empty string than a NULL pointer.   I know it's a personal 
preference, but when other people use libs that I've designed/developed, 
the empty string implementation SUBSTANTIALLY reduces core dumps :-))

That's my $0.02 worth

Renny Koshy
President & CEO

--------------------------------------------
RUBIX Information Technologies, Inc.
www.rubixinfotech.com




Alex Tingle <alex.tingle at bronermetals.com>
Sent by: omniorb-list-bounces at omniorb-support.com
09/28/2004 07:31 AM

 
        To:     'omniorb-list at omniorb-support.com' list <omniorb-list at omniorb-support.com>
        cc: 
        Subject:        Re: [omniORB] SystemException::NP_minorString() returns 0



>>   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.

Well, it causes a segmentation fault on my Linux box with gcc 2.95. 
I'll stick with my wrapper macro.

-Alex

--
Dammit Jim, I'm a programmer... not a mind reader!


_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040928/ac0dbd58/attachment.htm


More information about the omniORB-list mailing list