aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/firrtl/options/ExitCodes.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/options/ExitCodes.scala b/src/main/scala/firrtl/options/ExitCodes.scala
new file mode 100644
index 00000000..0e91fdec
--- /dev/null
+++ b/src/main/scala/firrtl/options/ExitCodes.scala
@@ -0,0 +1,15 @@
+// See LICENSE for license details.
+
+package firrtl.options
+
+/** The supertype of all exit codes */
+sealed trait ExitCode { val number: Int }
+
+/** [[ExitCode]] indicating success */
+object ExitSuccess extends ExitCode{ val number = 0 }
+
+/** An [[ExitCode]] indicative of failure. This must be non-zero and should not conflict with a reserved exit code. */
+sealed trait ExitFailure extends ExitCode
+
+/** An exit code indicating a general, non-specific error */
+object GeneralError extends ExitFailure { val number = 1 }