[omniORB] omniORBpy Exception Question (and
omniidlexception patch).
Randy Wiser
randyw@amc.com
Wed, 29 Mar 2000 11:04:21 -0800
At 10:06 AM 03/29/2000 +0100, Duncan Grisby wrote:
>Sorry to all the people on the list who don't care about Python. Maybe
>we need an omniORBpy list.
Yes, I for one would enjoy an omniORBpy list. :-)
With my limited knowledge of omniORBpy, I think using _args in the (hopefully rare) case of the IDL below would be best. I'm not sure why the __str__method is overridden.
Why would the __getitem__ method need to be overridden if all the arguments are passed on to exceptions.Exception.__init__()?
Thanks for your support!
- Randy
>The big problem is the args data member. Suppose I have an exception
>declared in IDL
>
> interface MyException {
> long args;
> };
>
>An instance of this exception will have a data member called args,
>which clashes with args in the exceptions.Exception base class. This
>means that the __str__ and __getitem__ methods won't work.
>CORBA.Exception already overrides the __str__ method; maybe I need to
>provide a __getitem__ method too? Would that solve your (Randy's)
>problem?
>
>Maybe the proper fix is to change the Python mapping to use _args
>instead of args in this case. Alternatively, I could try to convince
>Guido to change exceptions.Exception to call its data member
>__args. Since the args member is documented, I don't imagine he'd be
>keen on that...