Hi,

On Wed, Jan 16, 2013 at 11:04 PM, Jukka Zitting <jukka.zitt...@gmail.com> wrote:
> If yes, please revert, as these methods were intentionally added to
> satisfy the need for different exceptions in different cases.

Hmm, on second thought that's a bit harsh and not too constructive,
sorry. Let me rephrase:

If yes, please make sure that all the name- and path-related
exceptions that get thrown are still appropriate in their contexts.

Even though PathNotFoundException ISA RepositoryException, it has
fairly specific semantics and is thus not appropriate for all cases
where names and paths are used. For example, is the following code
correct:

    try {
        if (!session.getNode("/a:b").hasNode(*c:d")) {
            System.out.println("/a:b/c:d does not exist");
        }
    } catch (PathNotFoundException e) {
        System.out.println("/a:b does not exist");
    }

Currently it would end up printing "/a:b does not exist" even if the
node /a:b did exist but the namespace prefix c didn't!

BR,

Jukka Zitting

Reply via email to