[GitHub] ghilainm commented on a change in pull request #11: Propagate macro related exceptions to caller in xhtml parser

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

[GitHub] ghilainm commented on a change in pull request #11: Propagate macro related exceptions to caller in xhtml parser

GitBox
ghilainm commented on a change in pull request #11: Propagate macro related exceptions to caller in xhtml parser
URL: https://github.com/apache/maven-doxia/pull/11#discussion_r249834594
 
 

 ##########
 File path: doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlParser.java
 ##########
 @@ -269,11 +269,11 @@ private void processMacro( String text, Sink sink )
         }
         catch ( MacroExecutionException e )
         {
-            throw new XmlPullParserException( "Unable to execute macro in the document: " + macroName );
+            throw new XmlPullParserException( "Unable to execute macro in the document: " + macroName , null, e );
         }
         catch ( MacroNotFoundException me )
         {
-            throw new XmlPullParserException( "Macro not found: " + macroName );
+            throw new XmlPullParserException( "Macro not found: " + macroName, null, me );
 
 Review comment:
   @hboutemy  I have no time doing that. I have used the plugin in the context of another project and I don't have any example atm. What I can tell is that to find the cause of the issue I had to debug the plugin code to see the exception. So yes, in my case, the exception was totally useful. It is also for me anyway a bad practice to swallow exceptions.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]