Solved! Re: [omniORB] CORBA::UserException leads to abort(3) (linux, g++ 3.2)

Steffen DETTMER Steffen.DETTMER at ingenico.com
Fri Dec 1 19:06:48 GMT 2006


Hi!

(this is just for the archives in case someone else makes the
 same mistake)

* Steffen Dettmer wrote on Thu, Nov 30, 2006 at 18:56 +0100:
> I have a strange problem with exceptions. I have an IDL which
> defines a few exceptions. A servant throws such an exception. I
> expect that it is caught, serialised and would result in this
> exception on proxy side.

Seems I solved it, it was a problem with a "throw" clause.
The throw clause contained ::CORBA::SystemException only. I
assumed that then any ::CORBA::UserException and thus any self
defined exception would be included.

Now I made a test with TAO (which uses "throw" in the generated
servant base sources) and got a similar problem. I simply copied
all throw-clauses (were just 478 lines to change :() for all
prototypes and TAO was working.

With those fixed throw clauses Omni now also works. So it was
just a problem of the _impl-Sources.

Now I saw in omniORB4/CORBA_Exception.h that UserException is
/not/ a specialisation of SystemException.

BTW, I think (unless other ORBs should be supported), in general
the best is not to use the "throw" clause in C++ at all.

oki,

Steffen




More information about the omniORB-list mailing list