class SystemExit < Exception

Raised by exit and abort to end the program, as in Ruby. Outside StandardError, so a plain rescue lets it through: the ensure clauses it leaves run, and one nothing rescues ends the program with #status (from any task) after the at_exit blocks. rescue SystemExit (or Exception) catches it; exit! ends the program without it.

status = begin
  exit 3
rescue SystemExit => e
  e.status
end
status   # => 3

<prelude>:5372

Class methods

def self.new(status: Int = …, message: String = …) -> SystemExit

A SystemExit with status, not yet raised.

<prelude>:5376

Methods

def status -> Int

The status the program ends with.

<prelude>:5382

def success? -> Bool

Whether the status is 0.

<prelude>:5385