jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OAK-89) Improve exception handling
Date Wed, 09 May 2012 12:55:49 GMT

     [ https://issues.apache.org/jira/browse/OAK-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Jukka Zitting updated OAK-89:

    Attachment: OAK-89-3-changes.patch

Looks good. For convenience, the diff of your changes on top of mine is shown in the attached
OAK-89-3-changes.patch. The above GitHub URL is also up to date with your improvements.

bq. Generalised getOakPathOr... to getOakPathOrThrow such that clients can specify the exception

Constructing an exception can be time-consuming, so we should do it only when actually needed.
That's why I used separate signatures for those methods.

bq. Node.hasNode and Node.hasProperty must throw on invalid paths

Hmm. Is that in the spec? It would seem more logical to me to return false for unknown names.
> Improve exception handling
> --------------------------
>                 Key: OAK-89
>                 URL: https://issues.apache.org/jira/browse/OAK-89
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, jcr
>    Affects Versions: 0.2.1
>            Reporter: Michael Dürig
>         Attachments: OAK-89-2.patch, OAK-89-3-changes.patch, OAK-89-3.patch, OAK-89.patch,
> As discusses on the @oak-dev list [1] we need to improve the way exceptions are thrown
and handled. 
> I suggest to create a OakException which extends from RuntimeException and encapsulate
a RepositoryException into it. These exceptions can then be handled where appropriate. We
can the later turn this into a more sophisticated mechanism where the OakException is mapped
to a corresponding RepositoryException by an injected mapping (see Jukka's proposal in the
> [1] http://markmail.org/message/t5czrpkvyamn7sym

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message