JUnit runner caused by stack trace not shown

Consider the following:

---
public boolean doIt() throws Exception {
try {
doSomethingElse()
} catch (SomethingElseException e) {
throw new ItException(e);
}
}

...

public void testDoIt() {
assertTrue(doIt());
}
-



The runner windows shows just the ItException stack trace. The
text/message for the SomethingElseException is shown as the message for
the ItException, but the caused-by trace for the SomethingElseException
is not.

If I catch the ItExcetion in the test and print the stack trace...

---
public void testDoIt() {
try {
assertTrue(doIt());
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
---

... then I get the "Caused by" portion of the stack trace for the
SomethingElseException.

Is this a junit thing or an idea thing?


1 comment
Comment actions Permalink

Thanx, it fixed in build #856

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com

0

Please sign in to leave a comment.