diff options
| author | Andrew Waterman | 2015-07-28 20:09:10 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2015-07-28 20:09:10 -0700 |
| commit | 986590a87bf27961b12875bba15197fc58105a72 (patch) | |
| tree | 698b35238090ef3935ed1fbdce7cac698d7482e3 /src/main | |
| parent | fe1250c59ae8a444233fdf1a20264523e7788161 (diff) | |
Improve cloneType error messages
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/scala/Chisel/Core.scala | 10 |
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 } } } |
