Author: fgiust
Date: Sat Jul 29 06:14:32 2006
New Revision: 426797

URL: http://svn.apache.org/viewvc?rev=426797&view=rev
Log:
show file name in exception messages when a file can't be parsed

Modified:
    
maven/plugins/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java

Modified: 
maven/plugins/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java?rev=426797&r1=426796&r2=426797&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
 (original)
+++ 
maven/plugins/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
 Sat Jul 29 06:14:32 2006
@@ -65,9 +65,12 @@
             for ( int index = 0; index < xmlReportFiles.length; index++ )
             {
                 ReportTestSuite testSuite = new ReportTestSuite();
+                
+                String currentReport = xmlReportFiles[index];
+
                 try
                 {
-                    testSuite.parse( reportsDirectory + "/" + 
xmlReportFiles[index] );
+                    testSuite.parse( reportsDirectory + "/" + currentReport );
                 }
                 catch ( ParserConfigurationException e )
                 {
@@ -75,11 +78,11 @@
                 }
                 catch ( SAXException e )
                 {
-                    throw new MavenReportException( "Error parsing JUnit XML 
report", e );
+                    throw new MavenReportException( "Error parsing JUnit XML 
report " + currentReport, e );
                 }
                 catch ( IOException e )
                 {
-                    throw new MavenReportException( "Error reading JUnit XML 
report", e );
+                    throw new MavenReportException( "Error reading JUnit XML 
report " + currentReport, e );
                 }
 
                 testSuites.add( testSuite );


Reply via email to