Skip to content

Commit

Permalink
better error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Aug 28, 2010
1 parent 6e32ade commit ab63172
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -168,7 +168,10 @@ public void runAndExpect(Runnable runnable, Exception expected)
{
if (!expected.getClass().isAssignableFrom(e.getClass()))
{
throw new AssertionError("Expected exception " + expected + " but got " + e);
Error t = new AssertionError("Expected exception " + expected + " but got " + e);
t.initCause(e);
throw t;

}
if (expected.getMessage() == null)
{
Expand Down

0 comments on commit ab63172

Please sign in to comment.