Re: [orbitcpp-list] CORBA and C++ exceptions
Status: Beta
Brought to you by:
philipd
From: Phil D. <ph...@so...> - 2000-01-13 11:44:39
|
Hi Petter, [... patch snipped ...] Thanks for the patch, but unfortunately it doesn't compile! Normally I'm not keen on adding extra functionality to ORBit-C++ over and above what is in the spec, however in Henning&Vinoski's book* they state that an ostream operator for Exceptions is likely to be in future revisions of the spec anyway, so I'd be happy to accept a working patch for providing this. Some other comments: Make sure that the standard C++ stuff is prefixed with std:: to remain ansi compliant (I don't think g++ checks for this unless you give it the right cmd line args) I'm don't think I'm keen on having CORBA::Exception inherit from std::exception. It's not in the spec, and thus it would make people's programs behave differently if they port from a compliant ORB. Following on from the above, the what() function isn't part of the CORBA spec either, so I'd prefer if it was made private - you could then make the operator<<() a friend. Thanks again for making the effort to produce the patch; sorry if this email sounded a bit critical - that wasn't the intention. If you come up with a good ostream operator scheme, I'd be happy to update the compiler so that UserExceptions use it as well. Cheers, Phil. * 'Advanced Corba Programming with C++' Henning&Vinoski |