maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ken...@apache.org
Subject svn commit: r465568 - /maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java
Date Thu, 19 Oct 2006 10:57:18 GMT
Author: kenney
Date: Thu Oct 19 03:57:16 2006
New Revision: 465568

URL: http://svn.apache.org/viewvc?view=rev&rev=465568
Log:
Print out exception causes too, even if trimmed. 

Trimmed should mean 'do not include the junit classes in the stacktrace'.

Modified:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java?view=diff&rev=465568&r1=465567&r2=465568
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java
(original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java
Thu Oct 19 03:57:16 2006
@@ -73,6 +73,22 @@
             trace.append( lines[i] );
             trace.append( "\n" );
         }
+
+        for ( int i = lastLine; i < lines.length; i++ )
+        {
+            if ( lines[i].trim().startsWith( "Caused by" ) )
+            {
+                lastLine = i;
+                break;
+            }
+        }
+
+        for ( int i = lastLine; i < lines.length; i++ )
+        {
+            trace.append( lines[i] );
+            trace.append( "\n" );
+        }
+
         return trace.toString();
     }
 



Mime
View raw message