You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2021/08/06 07:14:00 UTC

[jira] [Created] (SLING-10705) Improve exception handling and error reporting

Carsten Ziegeler created SLING-10705:
----------------------------------------

             Summary: Improve exception handling and error reporting
                 Key: SLING-10705
                 URL: https://issues.apache.org/jira/browse/SLING-10705
             Project: Sling
          Issue Type: Improvement
          Components: Content-Package to Feature Model Converter
            Reporter: Carsten Ziegeler
            Assignee: Carsten Ziegeler
             Fix For: Content-Package to Feature Model Converter 1.1.8


The code is currently not distinguishing between user errors and tooling errors. For example an IllegalStateException might be thrown if an OSGi configuration is in the wrong place inside the content package as well as if there is an internal error inside the tool.
While the first category of errors can be fixed by users fixing/adjusting their code/content packlages - the second category hints at bugs in the code.
However both are reported exactly the same way.
I suggest we report the first one as errors via logging while the second one throws an exception to the "outside".

We can probably achieve this without much effort by using a special exception type for the first category.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)