tc.setTime((end - tc.getTime()) / 1000);
ts.setTime(ts.getTime() + tc.getTime());
error = true;
ts.setErrors(ts.getErrors() + 1);
Error e = new Error();
tc.getError().add(e);
e.setType(cause.getClass().getCanonicalName());
e.setMessage(cause.getMessage());
StringBuilder stack = new StringBuilder(cause.getMessage())
.append('\n');
for (StackTraceElement ste : cause.getStackTrace()) {
stack.append(ste.toString()).append('\n');
}
e.setContent(stack.toString());
printf("Error of test %1$s because of %2$s%n",
context.getFullTestName(), cause.getMessage());
resumedFailure.append("\t").append(context.getLocalTestName())
.append(" of ").append(context.getSetName())
.append(" caused by ").append(cause.getMessage()).append("\n");