sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bertrand Delacretaz (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SLING-9068) Add more context to ParseException
Date Thu, 20 Feb 2020 09:51:00 GMT

    [ https://issues.apache.org/jira/browse/SLING-9068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040810#comment-17040810
] 

Bertrand Delacretaz commented on SLING-9068:
--------------------------------------------

bq. this should be doable be adding explicit exceptions to the grammar.

I have not used those JavaCC features so far but the docs at https://github.com/javacc/javacc/blob/master/docs/tutorials/error-handling.md
seem to confirm this.

> Add more context to ParseException
> ----------------------------------
>
>                 Key: SLING-9068
>                 URL: https://issues.apache.org/jira/browse/SLING-9068
>             Project: Sling
>          Issue Type: Improvement
>          Components: Repoinit
>            Reporter: Angela Schreiber
>            Priority: Minor
>
> today the repo init grammar doesn't come with dedicated exception handing and thus the
parser will fail with messages that can make it hard to spot actual problem... specially in
a lengthy repo-init as it is present with Adobe AEM. Example:
> {code}
> org.apache.sling.repoinit.parser.impl.ParseException: Encountered " "," ", "" at line
115, column 46.
> Was expecting:
>     ")" ...
>     
> 	at org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.generateParseException(RepoInitParserImpl.java:3095)
[org.apache.sling.repoinit.parser:1.3.2]
> {code}
> if i am not mistaken this should be doable be adding explicit exceptions to the grammar.



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

Mime
View raw message