X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=org.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Ftest%2FSimpleResultPart.java;h=e114e1f6d15c34b7eb68aa4dd8e13cfb9d0813cf;hb=42aa6ffce6a95107cd10f908e5f9c695d902d571;hp=ef5512ccf5f2a180b559cb70357f03b6b9524343;hpb=c0d91522008fe240c20e1ae375b69258181d19b9;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/SimpleResultPart.java b/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/SimpleResultPart.java index ef5512ccf..e114e1f6d 100644 --- a/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/SimpleResultPart.java +++ b/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/SimpleResultPart.java @@ -1,6 +1,5 @@ package org.argeo.slc.core.test; - /** *
* Basic implementation of a result part, implementing the standard three status
@@ -59,31 +58,31 @@ public class SimpleResultPart implements TestResultPart, TestStatus,
if (exception == null)
return;
- //this.exceptionMessage = exception.getMessage();
-
StringBuffer buf = new StringBuffer("");
- buf.append(exception.getMessage());
+ buf.append(exception.toString());
buf.append('\n');
- for(StackTraceElement elem : exception.getStackTrace()){
- buf.append(elem.toString()).append('\n');
+ for (StackTraceElement elem : exception.getStackTrace()) {
+ buf.append('\t').append(elem.toString()).append('\n');
}
-
+
+ if (exception.getCause() != null)
+ addRootCause(buf, exception.getCause());
+
this.exceptionMessage = buf.toString();
-
-/*
- StringWriter writer = null;
- StringReader reader = null;
- try {
- writer = new StringWriter();
- exception.printStackTrace(new PrintWriter(writer));
- reader = new StringReader(writer.toString());
- exceptionStackLines = new Vector