cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@localbar.com>
Subject Re: A Suggestion for Cocoon2 Store
Date Sun, 26 Mar 2000 07:05:32 GMT
"Kevin A. Burton" wrote:

> Stefano Mazzocchi wrote:
> >
> > Ricardo Rocha wrote:
> > >
> > > Interface org.apache.cocoon.components.Store defines
> > > methods store(), hold() and remove() as void, not
> > > throwing any exception.
> >
> > +1
>
> -1.  Don't return boolean just throw an Exception.  This isn't C and it
> is proven that eventually people don't catch these.
>
> Throw a StoreException or something.

Agrees with Kevin.
Basis;  The mentioned Collections and File is not adequate comparisons.
Exceptions are thrown at non-regular conditions (hence the name) where as
elements not existing in a Collection or files not existing on a delete,
is a regular condition and should use return values.

A checked Exception, preferably a Cocoon exception able to wrap the actual
exception is to be prefered.

Suggestion, introduce a CocoonException which can wrap (similar to
java.lang.reflect.InvocationTargetException) other Exceptions, and have
other Cocoon related exceptions to be a subclass thereof.

Niclas


Mime
View raw message