<br><font size=2 face="sans-serif">I tend to agree with Alex's point of view on this... &nbsp;If the function is supposed to return a string, then returning NULL is probably not a great idea.</font>
<br>
<br><font size=2 face="sans-serif">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. &nbsp; 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 :-))</font>
<br>
<br><font size=2 face="sans-serif">That's my $0.02 worth</font>
<br>
<br><font size=2 face="sans-serif">Renny Koshy<br>
President &amp; CEO<br>
<br>
--------------------------------------------<br>
RUBIX Information Technologies, Inc.<br>
www.rubixinfotech.com</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Alex Tingle &lt;alex.tingle@bronermetals.com&gt;</b></font>
<br><font size=1 face="sans-serif">Sent by: omniorb-list-bounces@omniorb-support.com</font>
<p><font size=1 face="sans-serif">09/28/2004 07:31 AM</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; &nbsp; &nbsp;'omniorb-list@omniorb-support.com' list &lt;omniorb-list@omniorb-support.com&gt;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; &nbsp; &nbsp;Re: [omniORB] SystemException::NP_minorString() returns 0</font></table>
<br>
<br>
<br><font size=2 face="Courier New"><br>
&gt;&gt; &nbsp; cout&lt;&lt;ex-&gt;NP_minorString()&lt;&lt;endl;<br>
&gt;<br>
&gt; In all the iostream implementations I know, the latter will just print<br>
&gt; (null) or something similar, so it's not especially harmful.<br>
<br>
Well, it causes a segmentation fault on my Linux box with gcc 2.95. <br>
I'll stick with my wrapper macro.<br>
<br>
-Alex<br>
<br>
--<br>
Dammit Jim, I'm a programmer... not a mind reader!<br>
<br>
<br>
_______________________________________________<br>
omniORB-list mailing list<br>
omniORB-list@omniorb-support.com<br>
http://www.omniorb-support.com/mailman/listinfo/omniorb-list<br>
</font>
<br>
<br>