[Commented] (DOXIA-611) Throwing "new ParseException(message)" shows message with "line [-1]"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Commented] (DOXIA-611) Throwing "new ParseException(message)" shows message with "line [-1]"

Piotr Zygielo (Jira)

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

Abel Salgado Romero commented on DOXIA-611:
-------------------------------------------

Sent a proposal to fix this one: [https://github.com/apache/maven-doxia-sitetools/pull/16.]

It tries to modify the minimum ammout of code so the -1 is kept.-- But I think this could be better treated using a null value (requirs changing from int to Integer) instead of a -1.

> Throwing "new ParseException(message)" shows message with "line [-1]"
> ---------------------------------------------------------------------
>
>                 Key: DOXIA-611
>                 URL: https://issues.apache.org/jira/browse/DOXIA-611
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Site Renderer (moved to DOXIASITETOOLS)
>    Affects Versions: 1.9.1
>            Reporter: Abel Salgado Romero
>            Priority: Minor
>              Labels: intern
>
> When throwing a 'org.apache.maven.doxia.parser.ParseException' from a Doxia module indicating only a message or source exception a message pointing to line -1 is show in console.
> Exemple:
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7.1:site (default-cli) on project asciidoc-maven-site-example: Error parsing '/home/asalgadr/github/asciidoctor-maven-examples/asciidoc-maven-site-example/src/site/asciidoc/article.adoc': line [-1] Found 1 issue(s) of severity DEBUG or higher during rendering -> [Help 1]
>  
> I would expect that in case the line is not initialized, no reference to it is shown in the console.
>  



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