[omniORB] SystemException::NP_minorString() returns 0

Alex Tingle alex.omniorb at firetree.net
Sat Sep 25 19:04:19 BST 2004


Hi Duncan,

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?

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;

I expect to have to test the result of a call when it returns `char*',
but I'd usually expect functions that return `const char*' to always
give me something I can use.

What do you think? Is there a reason it's the way it is?

regards,

-Alex

-- 
:: alex tingle
:: 58 kings way, harrow, mddx. uk. HA1 1XU
:: alex.tingle AT firetree.net  +44-7901-552763 



More information about the omniORB-list mailing list