You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Felix Meschberger <fm...@adobe.com> on 2012/04/10 12:20:22 UTC
Re: oak api : initial draft
Hi,
Am 30.03.2012 um 16:15 schrieb Jukka Zitting:
> Hi,
>
> On Thu, Mar 29, 2012 at 6:24 PM, Felix Meschberger <fm...@adobe.com> wrote:
>> Well, if I cannot do anything about the exception, this is a sure sign
>> for a RuntimeException. But I might still want to catch them regardless
>> of the actual detail and do something about it.
>
> Do you have a concrete example in mind?
When using the Jackrabbit file based API to load node types from CND files, there is generic exception thrown in most cases. This is nasty since I want to handle the case of missing required node type (e.g. an extended base type) and duplicate node type differently -- maybe even ignoring them in some cases.
The only solution in this case was to analze the actual exception message ...
Regards
Felix
Re: oak api : initial draft
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Tue, Apr 10, 2012 at 12:20 PM, Felix Meschberger <fm...@adobe.com> wrote:
> Am 30.03.2012 um 16:15 schrieb Jukka Zitting:
>> Do you have a concrete example in mind?
>
> When using the Jackrabbit file based API to load node types from CND files, there is
> generic exception thrown in most cases. This is nasty since I want to handle the case
> of missing required node type (e.g. an extended base type) and duplicate node type
> differently -- maybe even ignoring them in some cases.
Hmm, when you said "there should be a root exception" in the thread
earlier, were you referring to using the "root cause" exception as a
part of the API or a "base class" exception like the
RepositoryException in JCR? The above case sounds more like the
former, while my original interpretation of your words was the latter.
BR,
Jukka Zitting