summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Waterman2015-07-28 20:09:10 -0700
committerAndrew Waterman2015-07-28 20:09:10 -0700
commit986590a87bf27961b12875bba15197fc58105a72 (patch)
tree698b35238090ef3935ed1fbdce7cac698d7482e3 /src
parentfe1250c59ae8a444233fdf1a20264523e7788161 (diff)
Improve cloneType error messages
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/Chisel/Core.scala10
1 files changed, 4 insertions, 6 deletions
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
}
}
}