[omniORB] How to compile TypeCode

Sai-Lai Lo S.Lo@orl.co.uk
19 Aug 1998 19:49:55 +0100


>>>>> Tom Gardner writes:

> On a different machine that has omniORB 2.5 ... the
> compilation is successful.

Support for typecode and any was added in omniORB 2.5.


> I thought I might pass along something else that I've found
> that doesn't work on either release.  When I redefine the
> type "PropertyException" from a struct to an exception (the
> ACE guys over at WUSTL have defined it this way for some
> reason ... don't know why yet?), the omniidl2 compiler
> core dumps on both releases.

> I've included the IDL file with a comment around the
> offending line.
>   //-------------------------------------
>   // Right here.  If this type is
>   //   defined as an exception, omniidl2
>   //   will core dump.
>   //-------------------------------------
>   // exception PropertyException {

>   struct PropertyException {
>    ExceptionReason reason;
>    PropertyName failing_property_name;
>   };
 
>   typedef sequence<PropertyException> PropertyExceptions;

>   exception MultipleExceptions {
>    PropertyExceptions exceptions;
>   };

The original IDL is wrong, PropertyException should be a struct.
Notice that it is illegal syntax to define sequence of exception.
And actually there is no operation that raises a PropertyException.

omniidl2 detects this error but did not report an error cleanly. It is a
bug.

Regards,

Sai-Lai


-- 
Dr. Sai-Lai Lo                          |       Research Scientist
                                        |
E-mail:         S.Lo@orl.co.uk          |       Olivetti & Oracle Research Lab
                                        |       24a Trumpington Street
Tel:            +44 223 343000          |       Cambridge CB2 1QA
Fax:            +44 223 313542          |       ENGLAND