Skip to content

Commit

Permalink
Make it possible to terminate from an ExitStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jul 2, 2024
1 parent b233945 commit 6d3b1f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/rudiments.ExitStatus.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ enum ExitStatus:
def apply(): Int = this match
case Ok => 0
case Fail(status) => status

def terminate(): Nothing =
System.exit(apply())
???

0 comments on commit 6d3b1f0

Please sign in to comment.