jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] Updated: (JCR-1674) Provide means for exception handling for QueryNodeVisitor implementations
Date Wed, 09 Jul 2008 13:35:32 GMT

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

Michael Dürig updated JCR-1674:
-------------------------------

    Attachment: QueryNodeVisitor.patch

> Provide means for exception handling for QueryNodeVisitor implementations
> -------------------------------------------------------------------------
>
>                 Key: JCR-1674
>                 URL: https://issues.apache.org/jira/browse/JCR-1674
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi-commons
>            Reporter: Michael Dürig
>            Priority: Minor
>         Attachments: QueryNodeVisitor.patch
>
>
> Currently the methods of QueryNodeVisitor do not declare any exceptions. Even though
the query tree might be syntactically correct, an implementation might reach a point where
it cannot continue (i.e. if it does not support one of the optional query features). For such
cases there are currently two solution: 1. throw an unchecked exception or 2. communicate
the error state through the visitor using the data object passed along. 
> While I don't like 2. it is still an option. For 1. I'm not sure if this is the right
way to go. It might be better to actually throw a checked exception. I therefore created a
patch which declares RepositoryException on all visit methods of QueryNodeVisitor. Although
the necessary changes in classes using QueryNodeVisitor are trivial, there are quite many
of them. 
> Any opinions on checked exception with probably breaking (trivially) existing code vs.
using not checked exceptions?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message