harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: [classlib] Exception throwing compatibility
Date Fri, 12 May 2006 11:15:03 GMT
Hi George,

2006/5/12, George Harley <george.c.harley@googlemail.com>:
> Mikhail Loenko wrote:
> > 2006/5/12, George Harley <george.c.harley@googlemail.com>:
> >> It sounds like there are as many interpretations of the guidelines as
> >> their are correspondents on this topic :-)
> >> My suggested change would be that we state that Harmony class library
> >> code should throw exceptions of the same runtime class as the RI.
> >
> > -1
> >
> > Do not see any reason to disallow throwing a subclass
> >
> > Thanks,
> > Mikhail
> >
>
> Hi Mikhail,
>
> Nor can I off the top of my head. So you are advocating something like
> "Harmony class library code should throw exceptions of the same runtime
> class (or a subtype of that runtime class) as the RI" ? Do you have in

Correct.


> mind a particular example of this in the current code base ?

We have a general discussion in the thread "[classlib] matching RI exceptions
-- are we required to have this type of compatibility? "

I can recall a specific example:
Most of the methods that use ASN.1 functionality declared to throw IOE

If some decoding errors occur we might:
- throw IOE
- throw dedicated ASN1Exception extending IOE
- throw ASN1E in decoder, then catch it in a public API method and convert to
IOE

Our implementation throws ASN1Exception extending IOE every time
ASN.1 error occurs. As far as there might be future classes such that RI throws
different exception (not an IOE) we keep possibility to catch ASN1 and wrap it
into another exception in certain rare cases.

Thanks,
Mikhail

>
> Best regards,
> George
>
>
> >
> >>
> >> Best regards,
> >> George
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message