incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Leau <>
Subject Re[2]: [jcr-mapping] exceptions
Date Mon, 03 Oct 2005 09:49:17 GMT
Hello Christophe,

>  try
>  {
>        some code
>  }
>  catch (Exception e)
>  {
>        throw new JcrMappingException("exception message" , e);
>  }

It is correct but it's just a wrapper around the exceptions - plus it
is way to general - it catches all the exceptions including user
defined for example.
And as I've said it forces the developer to do another catch block and
even extract the actual exception because it most cases (like the one
above) the JcrMappingException is just eating the initial exception.
JcrMappingException should have a value by itself - have exception
that actually belogn to the jcr-mapping functionality not be a
transporter for other exceptions.

Best regards,

View raw message