avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <j...@socialchange.net.au>
Subject Re: Removing dep on CascadingException in collections
Date Sat, 30 Mar 2002 00:27:44 GMT
On Fri, Mar 29, 2002 at 08:54:00AM -0500, Berin Loritsch wrote:
> > -----Original Message-----
> > From: Jeff Turner [mailto:jeff@socialchange.net.au] 
...
> > I would like to make Derived no longer extend Base, but 
> > otherwise maintain API compatibility by reimplementing Base's 
> > public methods. Any code that typecasts Derived to Base will 
> > break. I'm wondering, do we (or should we) guarantee this 
> > sort of compatibility?
> > 
> > In my case, I have:
> > 
> > public class CascadingRuntimeException    // in framework
> > 
> > public class BufferOverflowException 
> >     extends CascadingRuntimeException // in Excalibur's 
> > collections package
> 
> We can probably do it in this case.  If people cast the Exception
> to anything, it was RuntimeException or BuferOverflowException.

Good. Btw, I see the same situation in the Event code.. :)

...
> > because I can't think why anyone would want to typecast a 
> > RuntimeException, which are not even meant to be caught, let 
...
> RuntimeExceptions are meant to be caught, because they can be
> gracefully recovered from.  It is Errors that are not meant to
> be caught--you can't do anything to recover from it.

Ah ok. I meant, as opposed to regular Exceptions which must be
explicitly caught or let through.

--Jeff


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message