[Fresco-devel] throw specs at issue

Nick Lewycky <[email protected]> Sat, 03 May 2003 13:50:30 -0400
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
I found an interesting issue when working on compiling Fresco with TAO.

Their IDL compiler generates base classes with throw specifications (for 
CORBA::SystemException) on all of the methods. I didn't see an option to 
switch this behaviour off either.

Code examples in H&V and the CORBA C++ language mapping show methods 
being declared with throw(SystemException) on them. From section 1.37 
"Since all operations and attributes may throw CORBA system exceptions, 
CORBA::SystemException must appear in all exception specifications, even 
when an operation has no raises clause."

The only issue giving me pause is continuing compatibility with omniORB 
which does not generate such throw cluases on every method in the base 
class. But it appears to me that when deriving our Impl class, we can 
add whatever to the throw specs that we want. I tested this with gcc, 
but I'd appreciate if anyone who knows C++ could comment.

It seems that we should be adding throw(CORBA::SystemException) to every 
method we define. Am I correct? Should we start work on this?

Nick Lewycky