From 2e283367de28a26ef95f86cd30dcedb426042f18 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 25 Nov 2011 13:41:38 -0500 Subject: [PATCH] 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. --- src/test/scala/com/typesafe/config/impl/TestUtils.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/scala/com/typesafe/config/impl/TestUtils.scala b/src/test/scala/com/typesafe/config/impl/TestUtils.scala index 543fcb93..9012328b 100644 --- a/src/test/scala/com/typesafe/config/impl/TestUtils.scala +++ b/src/test/scala/com/typesafe/config/impl/TestUtils.scala @@ -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) } }