Bug 19118 - JUnitReport does not fail when it encounters an invalid XML file
Summary: JUnitReport does not fail when it encounters an invalid XML file
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.5.3
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-17 16:59 UTC by Stephen Goetze
Modified: 2008-11-24 03:57 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Goetze 2003-04-17 16:59:37 UTC
Currently the JUnitReport task only logs a warning if it encounters an invalid 
XML file (see the SAXException catch clause in the createDocument method in 
XMLResultAggregator).  As written, it is impossible to check for this condition 
within an Ant script.  Bug 19113 describes a case where the JUnit task can 
produce an invalid XML output file.

One possibility would be to support an errorproperty parameter (like the one 
one the JUnit task) that gets set if an error occurs.

Another choice (a little less flexible) would be to support a "failOnError" 
parameter.