You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2019/01/23 12:53:00 UTC

[jira] [Closed] (DOXIA-585) Propagate macro related exceptions to caller in xhtml parser

     [ https://issues.apache.org/jira/browse/DOXIA-585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hervé Boutemy closed DOXIA-585.
-------------------------------
    Resolution: Fixed
      Assignee: Hervé Boutemy

https://gitbox.apache.org/repos/asf?p=maven-doxia.git&a=commit&h=d977f4e4f4a9f7d5549f25daa56d3cd0f756023a

> Propagate macro related exceptions to caller in xhtml parser
> ------------------------------------------------------------
>
>                 Key: DOXIA-585
>                 URL: https://issues.apache.org/jira/browse/DOXIA-585
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Module - Xhtml
>    Affects Versions: 1.8
>            Reporter: Hervé Boutemy
>            Assignee: Hervé Boutemy
>            Priority: Major
>             Fix For: 1.9
>
>         Attachments: macro-failure.xhtml, macro-param.xhtml, macro-undefined.xhtml
>
>
> The exceptions are swallowed this is really unpractical when using the library (example building a site using mvn-site plugin).
> The 3 cases of failure (macro execution failure, parameter issue and undefined macro) give following explanation after {{[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7.1:site (default-site) on project xxx:}}:
> {noformat}
> Error parsing 'src/site/xhtml/macro-failure.xhtml': line [-1] Error parsing the model: Unable to execute macro in the document: toc{noformat}
> {noformat}
> Error parsing src/site/xhtml/macro-param.xhtml': line [-1] Error parsing the model: Missing 'key=value' pair for macro parameter: fail-param{noformat}
> {noformat}
> Error parsing 'src/site/xhtml/macro-undefined.xhtml': line [-1] Error parsing the model: Macro not found: undefined-macro{noformat}
> Keeping as much information as possible, we can get:
> {noformat}
> Error parsing 'src/site/xhtml/macro-failure.xhtml': line [35] Error parsing the model: Unable to execute macro in the document: toc (position: COMMENT seen ...losed tag that the toc macro will discover</p>\n<!-- MACRO{toc} -->... @35:20) caused by: org.apache.maven.doxia.macro.MacroExecutionException: ParseException: Error parsing the model: end tag name </body> must be the same as start tag <open> from line 37 (position: TEXT seen ...<!-- MACRO{toc} -->\n\n<open>\n\n</body>... @39:8){noformat}
> {noformat}
> Error parsing src/site/xhtml/macro-param.xhtml': line [35] Error parsing the model: Invalid 'key=value' pair for macro snippet parameter: fail-param (position: COMMENT seen ...et|id=macros|file=src/site/xhtml/xhtml-macro.xhtml|fail-param} -->... @35:83){noformat}
> {noformat}
> Error parsing 'src/site/xhtml/macro-undefined.xhtml': line [35] Error parsing the model: Macro not found: undefined-macro (position: COMMENT seen ...oes not exist: undefined-macro</p>\n<!-- MACRO{undefined-macro} -->... @35:32){noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)