Skip to content

Commit

Permalink
Merge pull request #3569 from chipsalliance/lm-error
Browse files Browse the repository at this point in the history
Add error message in LazyModule construction
  • Loading branch information
sequencer authored Feb 15, 2024
2 parents 33c16e3 + 2b4b79d commit 7b9d44f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/scala/diplomacy/LazyModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,14 @@ sealed trait LazyModuleImpLike extends RawModule {
dangles
} .getOrElse {
// For non-clones, instantiate the child module
val mod = Module(c.module)
val mod = try {
Module(c.module)
} catch {
case e: ChiselException => {
println(s"Chisel exception caught when instantiating ${c.name} within ${this.name} at ${c.line}")
throw e
}
}
mod.dangles
}
}
Expand Down

0 comments on commit 7b9d44f

Please sign in to comment.