jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matías Mirabelli <matias.mirabe...@globant.com>
Subject OCM exceptions handling.
Date Wed, 07 Oct 2009 18:47:39 GMT
Hello guys, I hope all you're well.

We're working with JackRabbit OCM and we need to trap specific
exceptions depending on the context in which occurs, and the OCM just
throws three kind of exceptions: ObjectContentManagerException,
RepositoryException and JcrSystemException.

We need to catch exceptions such as PathNotFoundException or
CouldNotRemoveException, since commonly we use several operations inside
the same try block, for example:

try {
} catch (ObjectContentManagerException ex) {
    // Here's the question.

Is there a way to know what exception was thrown without parsing the
message?. For the moment, we made a patch to the
ObjectContentManagerImpl in order to add some useful runtime exceptions,
avoiding ambiguous exceptions. If there's a better way for do it, I'd
appreciate your suggests, and I can send you the patch if the team
considers that may be useful.

I'll wait for your comments.

Thanks beforehand,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message