You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2012/12/10 09:35:24 UTC

[jira] [Reopened] (OAK-189) Swallowed exceptions

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

Thomas Mueller reopened OAK-189:
--------------------------------

      Assignee:     (was: Michael Dürig)

Now the exception stack trace is logged when using log level debug.

I'm not happy with the current solution, because exceptions are still silently swallowed by default (by default, because the log level is not debug by default). So for example if there is an IO exception in the MicroKernel, or anything strange happened, it will still behave in a strange way, and it's very hard to figure out whats going on.

I would prefer a solution where exceptions are used for truly exceptional cases, and not used for control flow. To me it looks like they are used for control flow currently, in those cases.
                
> Swallowed exceptions
> --------------------
>
>                 Key: OAK-189
>                 URL: https://issues.apache.org/jira/browse/OAK-189
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: Thomas Mueller
>             Fix For: 0.6
>
>
> Exceptions should not be silently swallowed. This is currently done in SessionDelegate$SessionNameMapper, methods getOakPrefix(), getOakPrefixFromURI(), and getJcrPrefix(). Those methods catch RepositoryException, don't log by default (only when using debug level), and don't log the exception stack trace or throw an exception.
> Catching a very wide band of exceptions (RepositoryException) and then simply returning null is not an acceptable solution in my view.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira