[ 
https://issues.apache.org/jira/browse/JCR-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674559#action_12674559
 ] 

Stefan Guggisberg commented on JCR-1847:
----------------------------------------

> the base exception was used solely inside jackrabbit-core just exactly to 
> deal with invalid (malformed) path, unknown names, invalid names, item-state 
> exceptions etc. and it was caught again within jackrabbit-core and rethrown 
> as RepositoryException (in very exceptional cases a subclass of it) all over 
> the place.

FWIW: 
the original (i.e. my;) idea behind BaseException was that it allows to clearly 
distinguish/detect internal exceptions from api exceptions (i.e. 
RepositiryExcception). exceptions thrown by internal code might not always be 
correct /useful in the context of an JCR api method. by using a separate base 
class for internal exceptions prevents potentially incorrect/meaningless 
internal exceptions being thrown by public JCR api methods.

just as a background information,  i don't wanna warm up previous discussions...




> Path methods should throw a specific exception instead of RepositoryEx
> ----------------------------------------------------------------------
>
>                 Key: JCR-1847
>                 URL: https://issues.apache.org/jira/browse/JCR-1847
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-spi
>            Reporter: Alexander Klimetschek
>            Assignee: angela
>            Priority: Minor
>
> The o.a.j.spi.Path interface declares most methods to throw a RepositoryEx, 
> whereas a o.a.j.spi.commons.conversion.NameEx (or another specific exception) 
> would make more sense, since the RepositoryEx is too generic for what seems 
> to be a "malformed names/path" nature for all things that happen in a Path 
> implementation.

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

Reply via email to