jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1847) Path methods should throw a specific exception instead of RepositoryEx
Date Wed, 05 Nov 2008 14:59:44 GMT

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

Alexander Klimetschek commented on JCR-1847:

> that's what we had before.... resulting in
> } catch (WhatEverNameException wene) {
>      throw new RepositoryException();
> }

You have that anyway, since other path related utility methods throw specific exceptions (NameEx,
IllegalNameEx, etc.), see the example ObservationManagerImpl. It would be more consistent
if such a helper class had its own exception - RepositoryEx is only the wrapper for everything
that could fail, it's not better than simply using Exception. And when I see RepositoryEx
I think of unforseeable cases such as network broken... which is what i originally should
only represent. But that is a (minor) problem with the JCR spec ;-)

> Path methods should throw a specific exception instead of RepositoryEx
> ----------------------------------------------------------------------
>                 Key: JCR-1847
>                 URL: https://issues.apache.org/jira/browse/JCR-1847
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi
>            Reporter: Alexander Klimetschek
>            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.

View raw message