From 0ace0218d3151df2d102463dd682128a88ae7be6 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Fri, 22 Feb 2019 13:59:33 -0800 Subject: Stop reporting exceptions in custom transformations as internal errors (#867) Instead, just forward the exception--- .../firrtlTests/annotationTests/EliminateTargetPathsSpec.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala') diff --git a/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala b/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala index de84d79d..c75e0914 100644 --- a/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala +++ b/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala @@ -260,16 +260,19 @@ class EliminateTargetPathsSpec extends FirrtlPropSpec with FirrtlMatchers { | m2.i <= m1.o | o <= m2.o """.stripMargin - intercept[NoSuchTargetException] { + val e1 = the [CustomTransformException] thrownBy { val Top_m1 = Top.instOf("m1", "MiddleX") val inputState = CircuitState(parse(input), ChirrtlForm, Seq(DummyAnnotation(Top_m1))) new LowFirrtlCompiler().compile(inputState, customTransforms) } - intercept[NoSuchTargetException] { + e1.cause shouldBe a [NoSuchTargetException] + + val e2 = the [CustomTransformException] thrownBy { val Top_m2 = Top.instOf("x2", "Middle") val inputState = CircuitState(parse(input), ChirrtlForm, Seq(DummyAnnotation(Top_m2))) new LowFirrtlCompiler().compile(inputState, customTransforms) } + e2.cause shouldBe a [NoSuchTargetException] } property("No name conflicts between two new modules") { -- cgit v1.2.3