[omniORB] omniORBpy Exception Question (and omniidl exception patch).
Robert Sander
gurubert@gurubert.de
Tue, 28 Mar 2000 14:41:19 +0200
On Tue, Mar 28, 2000 at 10:32:40AM +0100, Duncan Grisby wrote:
> On Monday 27 March, Randy Wiser wrote:
>
> > Why do the stubs generated by omniidl inherit from class Exception
> > in the standard Python module exceptions.py, but the generated
> > __init__ methods fail to call the __init__ method
> > (exceptions.Exception.__init__) in the class they inherit from?
>
> There is, in fact, no reason for CORBA.Exception to be derived from
> exceptions.Exception, so I have removed it. It doesn't do any harm to
> inherit from exceptions.Exception, but it would be wrong to call its
> __init__() method, since that would potentially overwrite exception
> data members.
Hm, I think somewhere in the Python reference is stated that every exception
should be inhereted from exceptions.Exception, just because to have a generic
Superclass that could be excepted.
Overwriting issues are another thing, but I do not think that it is necessary
to call the constructor of the Superclass in this example.
Greetings
--
Robert Sander www.gurubert.de