[ 
https://issues.apache.org/jira/browse/OAK-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13526758#comment-13526758
 ] 

Jukka Zitting commented on OAK-189:
-----------------------------------

bq. the decision taken in OAK-89 to use checked exceptions everywhere

I don't see such a decision in that issue.

The problem here is that the API the SessionNameMapper is using does not 
distinguish between actionable exceptions (something like a 
NamespaceNotFoundException) and a too generic base class (RepositoryException) 
for which there's no reasonable action to be taken at that level of the code.

A deeper solution to this problem could be to make SessionNameMapper have 
direct access to the internal namespace mappings used by the associated 
SessionImpl instance (or perhaps even make SessionNameMapper responsible for 
managing those mappings). That way we wouldn't have to roundtrip through the 
JCR API and deal with potential extra exceptions.
                
> Swallowed exceptions
> --------------------
>
>                 Key: OAK-189
>                 URL: https://issues.apache.org/jira/browse/OAK-189
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: Thomas Mueller
>            Assignee: Michael Dürig
>             Fix For: 0.6
>
>
> Exceptions should not be silently swallowed. This is currently done in 
> SessionDelegate$SessionNameMapper, methods getOakPrefix(), 
> getOakPrefixFromURI(), and getJcrPrefix(). Those methods catch 
> RepositoryException, don't log by default (only when using debug level), and 
> don't log the exception stack trace or throw an exception.
> Catching a very wide band of exceptions (RepositoryException) and then simply 
> returning null is not an acceptable solution in my view.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to