You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <fm...@adobe.com> on 2015/01/12 10:44:01 UTC

[SLING-4275] API: Exceptions

Hi all

Carsten started to review the Sightly Engine API in SLING-4275 [1]. Since this issue covers 4 topics, I think it would be best to quickly discuss these topic in separate threads.

#1 Exceptions

The root exception is SightlyException extends SlingException. As such it is a RuntimeException.

Question is whether we need an exception hierarchy or not.

The current exception types are thrown from different extension of the Sightly Engine such as RuntimeExtension instances or UseProviders.

Most of the time these exceptions are caught and handled inside the Sightly Engine. As such it might be conceivable to actually collapse those exceptions into the root SightlyException.

On the other hand: Are there exceptions defined that we expect to be caught by consumer code outside of the Sightly Engine ? Such exceptions probably make sense and should be kept.

WDYT ?

Regards
Felix

[1] https://issues.apache.org/jira/browse/SLING-4275

Re: [SLING-4275] API: Exceptions

Posted by Radu Cotescu <ra...@apache.org>.
Hi,

I think that we can collapse the exception into the root SightlyException,
Carsten's proposal makes sense.

Regards,
Radu

On Mon, Jan 12, 2015 at 11:44 AM, Felix Meschberger <fm...@adobe.com>
wrote:

> Hi all
>
> Carsten started to review the Sightly Engine API in SLING-4275 [1]. Since
> this issue covers 4 topics, I think it would be best to quickly discuss
> these topic in separate threads.
>
> #1 Exceptions
>
> The root exception is SightlyException extends SlingException. As such it
> is a RuntimeException.
>
> Question is whether we need an exception hierarchy or not.
>
> The current exception types are thrown from different extension of the
> Sightly Engine such as RuntimeExtension instances or UseProviders.
>
> Most of the time these exceptions are caught and handled inside the
> Sightly Engine. As such it might be conceivable to actually collapse those
> exceptions into the root SightlyException.
>
> On the other hand: Are there exceptions defined that we expect to be
> caught by consumer code outside of the Sightly Engine ? Such exceptions
> probably make sense and should be kept.
>
> WDYT ?
>
> Regards
> Felix
>
> [1] https://issues.apache.org/jira/browse/SLING-4275