jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: Remove o.a.j.BaseException?
Date Tue, 31 Jan 2006 09:20:41 GMT
On 1/31/06, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
>
> The org.apache.jackrabbit.BaseException class implements the root
> cause mechanism that is also available built-in since Java 1.4. As we
> already require Java 1.4 I propose that we remove the BaseException
> class in favor of the standard Exception.
>
> There are a few cases where the BaseException is explicitly referenced
> like this:
>
>     try {
>         // do something
>     } catch (BaseException e) {
>         // generic error handling
>     }
>
> Is there a semantic reason for this or could such cases be replaced
> with "catch (Exception e)"? In the former case I propose that a more
> descriptive exception base class is created.

BaseException is the equivalent to RepositoryException. it's used to
distinguish implementation (i.e. jackrabbit) specific exceptions from
jcr api exceptions.

+1 for renaming it and removing root cause mechanism (leftover from
early implementations that were jre 1.3 compatible).

-1 for removing it

cheers
stefan

>
> BR,
>
> Jukka Zitting
>
> --
> Yukatan - http://yukatan.fi/ - info@yukatan.fi
> Software craftmanship, JCR consulting, and Java development
>

Mime
View raw message