diff options
| author | Jiuyang Liu | 2021-11-23 03:47:22 +0800 |
|---|---|---|
| committer | GitHub | 2021-11-22 19:47:22 +0000 |
| commit | 44855f0908bce492e881873f5088138ba86fddaa (patch) | |
| tree | aebb9646e67119b1eaecd90225c65093a89479e0 /src | |
| parent | 15c0d4a041b50389fb386733c53a7012535f9b71 (diff) | |
remove firrtl.FIRRTLException (#2421)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/FirrtlException.scala | 16 | ||||
| -rw-r--r-- | src/main/scala/firrtl/stage/phases/CatchExceptions.scala | 13 |
2 files changed, 3 insertions, 26 deletions
diff --git a/src/main/scala/firrtl/FirrtlException.scala b/src/main/scala/firrtl/FirrtlException.scala index 685718cd..9df881bc 100644 --- a/src/main/scala/firrtl/FirrtlException.scala +++ b/src/main/scala/firrtl/FirrtlException.scala @@ -4,22 +4,6 @@ package firrtl import scala.util.control.NoStackTrace -@deprecated("External users should use either FirrtlUserException or their own hierarchy", "FIRRTL 1.2") -object FIRRTLException { - def defaultMessage(message: String, cause: Throwable) = { - if (message != null) { - message - } else if (cause != null) { - cause.toString - } else { - null - } - } -} -@deprecated("External users should use either FirrtlUserException or their own hierarchy", "FIRRTL 1.2") -class FIRRTLException(val str: String, cause: Throwable = null) - extends RuntimeException(FIRRTLException.defaultMessage(str, cause), cause) - /** Exception indicating user error * * These exceptions indicate a problem due to bad input and thus do not include a stack trace. diff --git a/src/main/scala/firrtl/stage/phases/CatchExceptions.scala b/src/main/scala/firrtl/stage/phases/CatchExceptions.scala index c3b304a5..1c6b6f47 100644 --- a/src/main/scala/firrtl/stage/phases/CatchExceptions.scala +++ b/src/main/scala/firrtl/stage/phases/CatchExceptions.scala @@ -3,14 +3,7 @@ package firrtl.stage.phases import firrtl.options.{DependencyManagerException, OptionsException, Phase, PhaseException} -import firrtl.{ - AnnotationSeq, - CustomTransformException, - FIRRTLException, - FirrtlInternalException, - FirrtlUserException, - Utils -} +import firrtl.{AnnotationSeq, CustomTransformException, FirrtlInternalException, FirrtlUserException, Utils} import scala.util.control.ControlThrowable @@ -31,8 +24,8 @@ class CatchExceptions(val underlying: Phase) extends Phase { } catch { /* Rethrow the exceptions which are expected or due to the runtime environment (out of memory, stack overflow, etc.). * Any UNEXPECTED exceptions should be treated as internal errors. */ - case p @ (_: ControlThrowable | _: FIRRTLException | _: OptionsException | _: FirrtlUserException | - _: FirrtlInternalException | _: PhaseException | _: DependencyManagerException) => + case p @ (_: ControlThrowable | _: OptionsException | _: FirrtlUserException | _: FirrtlInternalException | + _: PhaseException | _: DependencyManagerException) => throw p case CustomTransformException(cause) => throw cause case e: Exception => Utils.throwInternalError(exception = Some(e)) |
