You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Matias Mirabelli (JIRA)" <ji...@apache.org> on 2009/10/28 21:24:59 UTC

[jira] Updated: (OCM-38) OCM enhanced exceptions.

     [ https://issues.apache.org/jira/browse/OCM-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matias Mirabelli updated OCM-38:
--------------------------------

    Attachment: ocm_exceptions.diff

Ok, I found the "add attachment" link. Here's the patch with the following changes:

- Created more accurate runtime exceptions.
- Applied the new exceptions to the ObjectContentManagerImpl and ObjectConverterImpl classes.

I hope that it'll be useful.

Regards,

Matias.

> OCM enhanced exceptions.
> ------------------------
>
>                 Key: OCM-38
>                 URL: https://issues.apache.org/jira/browse/OCM-38
>             Project: Jackrabbit OCM
>          Issue Type: Improvement
>         Environment: All operating systems, JDK 1.4+
>            Reporter: Matias Mirabelli
>         Attachments: ocm_exceptions.diff
>
>
> 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 PathAlreadyExistsException, since commonly we use several operations inside the same try block, for example:
> try {
>     jcrTemplate.remove("/my/repo/path");
>     jcrTemplate.save();
> } catch (ObjectContentManagerException ex) {
>     // Here's the question.
> }
> In several cases, this is ambiguous and is not possible to know what exception was thrown without parsing the exception message. We made a patch to the ObjectContentManager implementation in order to add several useful runtime exceptions, keeping backward compatibility with the old exceptions.
> I'd like to submit a patch for this improvement. Is there a way to attach the patch, or just can be included as part of the report?
> Thank you in advance.
> Matias.

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