Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix StackTrace printing when multiple exceptions occur (#1238) #1359

Merged
merged 1 commit into from
Sep 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.junit.runners.model;

import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -39,6 +41,27 @@ public String getMessage() {
return sb.toString();
}

@Override
public void printStackTrace() {
for (Throwable e: fErrors) {
e.printStackTrace();
}
}

@Override
public void printStackTrace(PrintStream s) {
for (Throwable e: fErrors) {
e.printStackTrace(s);
}
}

@Override
public void printStackTrace(PrintWriter s) {
for (Throwable e: fErrors) {
e.printStackTrace(s);
}
}

/**
* Asserts that a list of throwables is empty. If it isn't empty,
* will throw {@link MultipleFailureException} (if there are
Expand Down