From 986590a87bf27961b12875bba15197fc58105a72 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 28 Jul 2015 20:09:10 -0700 Subject: Improve cloneType error messages --- src/main/scala/Chisel/Core.scala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main/scala/Chisel/Core.scala b/src/main/scala/Chisel/Core.scala index d49fe624..90f6b07a 100644 --- a/src/main/scala/Chisel/Core.scala +++ b/src/main/scala/Chisel/Core.scala @@ -972,13 +972,11 @@ class Bundle(dirArg: Direction = NO_DIR) extends Aggregate(dirArg) { res.asInstanceOf[this.type] } catch { case npe: java.lang.reflect.InvocationTargetException if npe.getCause.isInstanceOf[java.lang.NullPointerException] => - // throwException("Parameterized Bundle " + this.getClass + " needs cloneType method. You are probably using an anonymous Bundle object that captures external state and hence is un-cloneTypeable", npe) - val s = "CLONE INVOCATION EXCEPTION " + this.getClass - error(s) + ChiselError.error(s"Parameterized Bundle ${this.getClass} needs cloneType method. You are probably using an anonymous Bundle object that captures external state and hence is un-cloneTypeable") + this case e: java.lang.Exception => - val s = "CLONE ANY EXCEPTION " + this.getClass - error(s) - // throwException("Parameterized Bundle " + this.getClass + " needs cloneType method", e) + ChiselError.error(s"Parameterized Bundle ${this.getClass} needs cloneType method") + this } } } -- cgit v1.2.3