diff options
| author | Schuyler Eldridge | 2019-08-14 16:10:10 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-08-27 19:56:11 -0400 |
| commit | d1221efc40e7374691f0ff948c99379d0f52012f (patch) | |
| tree | 109c768e460bad98675ce6aa0f1e63c88a445c1e /src/main/scala/firrtl/options/Exceptions.scala | |
| parent | 82acc83280045fb5f71bf0e2b1b6a4fba324bff2 (diff) | |
Add StageError
This adds the StageError Error. This Error indicates that a
Stage/Phase has hit an unrecoverable error, it cannot continue, and
requests that the entire Stage/Phase hierarchy be killed with an
ExitFailure ExitCode. StageMain is modified to catch StageError and
exit the application with the provided exit code number.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/main/scala/firrtl/options/Exceptions.scala')
| -rw-r--r-- | src/main/scala/firrtl/options/Exceptions.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/options/Exceptions.scala b/src/main/scala/firrtl/options/Exceptions.scala index 100ff464..38b2f2e2 100644 --- a/src/main/scala/firrtl/options/Exceptions.scala +++ b/src/main/scala/firrtl/options/Exceptions.scala @@ -18,3 +18,6 @@ class OptionsException(val message: String, cause: Throwable = null) extends Ill * out of order or if the compiler did not run things in the correct order. */ class PhasePrerequisiteException(message: String, cause: Throwable = null) extends PhaseException(message, cause) + +/** Indicates that a [[Stage]] or [[Phase]] has run into a situation where it cannot continue. */ +final class StageError(val code: ExitFailure = GeneralError, cause: Throwable = null) extends Error("", cause) |
