On 10/3/05, Costin Leau <[EMAIL PROTECTED]> wrote:
> Hello,
>
> another remark on the exceptions from jcr-mapping project. Why isn't
> there a base exception
Yes there is one : JcrMappingException but we have not yet defined the
exception hierarchy. I would like to minize the number of exception.
and why java.lang.Exception is extended instead
> of the javax.jcr.RepositoryException?
It is a good suggestion
> As the jcr-mapping is based on a JCR implementation it should extend
> the JCR exception hierarchy. Right now the code executing with
> jcr-mapping has to do a:
>
> try
> {
> .. some code
> } catch (RepositoryException re)
> {
> // from work on the repository
> } catch (JcrMappingException jme)
> {
> // from mapping code
> }
>
Well, the code is still under dev and maybe we have to review the
exception management but why the following code is not correct ?
try
{
some code
}
catch (Exception e)
{
throw new JcrMappingException("exception message" , e);
}