Crate semantic_exit

source ·
Expand description

Defines semantic exit codes which may be used by Command Line tools to aid in debugging and instrumentation.

This package defines exit codes in two ranges:

  • Exit Codes 80-99 indicate a user error of some sort.
  • Exit Codes 100-119 indicate software or system error of some sort.

Enums

The exit code that is passed to the system call exit when the program terminates. Conventionally, the value zero indicates success and all other values (1-255) indicate failure.

Functions

Returns the exit code that corresponds to when a program exits in response to a signal.
Reports whether an exit code is derived from a signal. It returns true if the code is in the range 128-255 and false if not.
Reports whether an exit code is a software error. It returns true if the code is in the range 100-119 and false if not.
Reports whether an exit code is a user error. It returns true if the code is in the range 80-99 and false if not.