Re: [orbitcpp-list] CORBA and C++ exceptions
Status: Beta
Brought to you by:
philipd
From: Phil D. <ph...@li...> - 2000-01-15 22:22:20
|
Petter Reinholdtsen wrote: > > [Phil Dawes] > > Thanks for the patch, but unfortunately it doesn't compile! > > Yes, I noticed that as well when I testcompiled it. It was a quick > and dirty version to see how such change would be received. The > exception part works, but the 'operator<<' needs more work. > > > 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. > > My problem is that I do not have the spec, nor a good description on > how CORBA should work in C++. Do you know of such online > documentation? > You should be able to get the C++ language mapping spec on http://www.omg.org/library/clangindx.html > > 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) > > Sounds reasonable. What is the cmd line args? > Don't know off hand - It'll be in the gcc info files. > > 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. > > I do not follow you. If the programs are programmed correctly, they > will not be able to detect the difference. If I'm not mistaken, the > std::exception class was made to have a common exception class to > inherit from. Having such toplevel superclass makes a lot of things > easier. It means that people catching std::exception and handling it would also catch CORBA::Exceptions, but this wouldn't happen with other CORBA implementations (the exception would slip through and segfault). > > > Thanks again for making the effort to produce the patch; sorry if > > this email sounded a bit critical - that wasn't the intention. > > I enjoy getting comments on my suggested changes. :-) > Cool! Cheers, Phil. |