- abort
Abort
abort is the combination of printing to the STDERR and calling exit with an exit code.
examples/process/abort.cr
abort("Something bad happened")
examples/process/abort_code.cr
abort("Something bad happened", 3)
- abort prints a message to STDERR and exit with exit code 1 (see $? or %ERROR_LEVEL%)
- Optionally we can supply the exit code as well.