mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 20:42:21 +00:00
Check for printStackTrace overrides.
This commit is contained in:
1 parent
da54171682
commit
187731fd88
2 files changed
+13
-1
No files matched your search
@@ -494,6 +494,13 @@ public class FunctionsTest {
|
||||
"Caused: java.lang.IllegalStateException\n" +
|
||||
"\tat p.C.method1(C.java:19)\n" +
|
||||
"\tat m.Main.main(Main.java:1)\n");
|
||||
// Custom printStackTrace implementations:
|
||||
assertPrintThrowable(new Throwable() {
|
||||
@Override
|
||||
public void printStackTrace(PrintWriter s) {
|
||||
s.println("Some custom exception");
|
||||
}
|
||||
}, "Some custom exception\n", "Some custom exception\n");
|
||||
}
|
||||
private static void assertPrintThrowable(Throwable t, String traditional, String custom) {
|
||||
StringWriter sw = new StringWriter();
|
||||
|
||||
Reference in new issue
Block a user