when rethrowing a json exception don't use AssertionError

it seems to make Eclipse fail to show the "cause" exception,
and I don't know of a reason we need to use AssertionError.
This commit is contained in:
Havoc Pennington 2011-11-25 13:41:38 -05:00
parent 00f8b3d507
commit 2e283367de

View File

@ -303,7 +303,9 @@ abstract trait TestUtils {
case e =>
"tokenizer failed: " + e.getMessage();
}
throw new AssertionError(parserName + " parser did wrong thing on '" + s + "', " + tokens, t)
// don't use AssertionError because it seems to keep Eclipse
// from showing the causing exception in JUnit view for some reason
throw new Exception(parserName + " parser did wrong thing on '" + s + "', " + tokens, t)
}
}