diff options
| author | Palmer Dabbelt | 2015-10-08 15:44:18 -0700 |
|---|---|---|
| committer | Palmer Dabbelt | 2015-10-08 15:44:36 -0700 |
| commit | 7b1babf87ef9eef968a0d9efedc389886aafbf70 (patch) | |
| tree | 8f283332d2e9cb563feb6eb9783bdc3a41ed5cc0 | |
| parent | f83c25a43c1f10eaa8b5d99a35209091110dc5dd (diff) | |
Handle IllegalArgumentExcetions that mean a cloneType is needed
When trying to cloneType() on classes that take a builtin (like Int),
we get an IllegalArgumentException instead of a InvocationTargetException.
This change prints a nice error message instead of a stack trace.
| -rw-r--r-- | src/main/scala/Chisel/Core.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/scala/Chisel/Core.scala b/src/main/scala/Chisel/Core.scala index ad938085..3d39b403 100644 --- a/src/main/scala/Chisel/Core.scala +++ b/src/main/scala/Chisel/Core.scala @@ -791,7 +791,7 @@ class Bundle extends Aggregate(NO_DIR) { Builder.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 _: java.lang.reflect.InvocationTargetException => + case _: java.lang.reflect.InvocationTargetException | _: java.lang.IllegalArgumentException => Builder.error(s"Parameterized Bundle ${this.getClass} needs cloneType method") this } |
