diff options
| author | Albert Chen | 2018-11-26 09:47:28 -0800 |
|---|---|---|
| committer | Schuyler Eldridge | 2018-11-26 12:47:28 -0500 |
| commit | ab951049c2c60402e2318ba863520d4a16c8288d (patch) | |
| tree | 496a62cb509f06711a01795bca7eafc8ae260a8b /chiselFrontend/src/main/scala/chisel3/core | |
| parent | dd82374f79005a2998b016712f0aec07775eb506 (diff) | |
Trim Stack Trace (#931)
- Trim stack trace to show better, reduced information to the user
- Add --full-stacktrace to FIRRTL option to show full stack trace
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core')
5 files changed, 8 insertions, 5 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala b/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala index 9a2e9a38..5563092e 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala @@ -507,7 +507,7 @@ trait IgnoreSeqInBundle { override def ignoreSeq: Boolean = true } -class AutoClonetypeException(message: String) extends ChiselException(message, null) +class AutoClonetypeException(message: String) extends ChiselException(message) /** Base class for data types defined as a bundle of other data types. * diff --git a/chiselFrontend/src/main/scala/chisel3/core/Attach.scala b/chiselFrontend/src/main/scala/chisel3/core/Attach.scala index edc0a7c9..b3096fd5 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Attach.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Attach.scala @@ -9,7 +9,7 @@ import chisel3.internal.sourceinfo.{SourceInfo} object attach { // scalastyle:ignore object.name // Exceptions that can be generated by attach - case class AttachException(message: String) extends Exception(message) + case class AttachException(message: String) extends ChiselException(message) def ConditionalAttachException = AttachException(": Conditional attach is not allowed!") diff --git a/chiselFrontend/src/main/scala/chisel3/core/BiConnect.scala b/chiselFrontend/src/main/scala/chisel3/core/BiConnect.scala index 1dcb968d..ad7ba98a 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/BiConnect.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/BiConnect.scala @@ -2,6 +2,7 @@ package chisel3.core +import chisel3.internal.ChiselException import chisel3.internal.Builder.pushCommand import chisel3.internal.firrtl.{Connect, DefInvalid} import scala.language.experimental.macros @@ -23,7 +24,7 @@ import chisel3.internal.sourceinfo._ object BiConnect { // These are all the possible exceptions that can be thrown. - case class BiConnectException(message: String) extends Exception(message) + case class BiConnectException(message: String) extends ChiselException(message) // These are from element-level connection def BothDriversException = BiConnectException(": Both Left and Right are drivers") diff --git a/chiselFrontend/src/main/scala/chisel3/core/Binding.scala b/chiselFrontend/src/main/scala/chisel3/core/Binding.scala index b3b754de..60235477 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Binding.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Binding.scala @@ -1,10 +1,11 @@ package chisel3.core +import chisel3.internal.ChiselException import chisel3.internal.Builder.{forcedModule} import chisel3.internal.firrtl.LitArg object Binding { - class BindingException(message: String) extends Exception(message) + class BindingException(message: String) extends ChiselException(message) /** A function expected a Chisel type but got a hardware object */ case class ExpectedChiselTypeException(message: String) extends BindingException(message) diff --git a/chiselFrontend/src/main/scala/chisel3/core/MonoConnect.scala b/chiselFrontend/src/main/scala/chisel3/core/MonoConnect.scala index c9420ba7..d4c80405 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/MonoConnect.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/MonoConnect.scala @@ -2,6 +2,7 @@ package chisel3.core +import chisel3.internal.ChiselException import chisel3.internal.Builder.pushCommand import chisel3.internal.firrtl.{Connect, DefInvalid} import scala.language.experimental.macros @@ -33,7 +34,7 @@ import chisel3.internal.sourceinfo.SourceInfo object MonoConnect { // These are all the possible exceptions that can be thrown. - case class MonoConnectException(message: String) extends Exception(message) + case class MonoConnectException(message: String) extends ChiselException(message) // These are from element-level connection def UnreadableSourceException = MonoConnectException(": Source is unreadable from current module.") |
