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 Thu, 11 May 2006 14:58:52 GMT
P.S. What if depending on the reason RI throws different subclass
of what is in the spec? Are we going to explore all possible combinations?

2006/5/11, Mikhail Loenko <mloenko@gmail.com>:
> What is the reason for prohibiting throwing a sub-class?
>
> Every existing try... catch construction will work
>
> Do we really want to convert all tests like
> try {
>    do something
>    fail();
> } catch (SomeException e) {
>    //expected
> }
> to something like
> try {
>    do something
>    fail();
> } catch (SomeException e) {
>    assertEquals(SomeException.class, e.getClass());
> }
>
> Thanks,
> Mikhail
>
> 2006/5/11, Geir Magnusson Jr <geir@pobox.com>:
> >
> >
> > George Harley wrote:
> >
> > >
> > > * Little old me thinks that there *is* a problem here but that the
> > > solution is to do as the RI does and throw exceptions with the very same
> > > runtime type as the RI. That's based on my interpretation of the
> > > exception-throwing compatibility guidelines [2], in particular the
> > > fragment "Harmony class library code should throw exceptions of the same
> > > type as the RI".
> >
> > +1
> >
> >
> > ---------------------------------------------------------------------
> > 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