exit-codes-1.0.0: Exit codes as defined by BSD

Copyright(c) Justus Adam 2015 - 2018
LicenseBSD-3
Maintainerdev@justus.science
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

System.Exit.Codes

Contents

Description

These are Haskell values generated by the C pre processor which expose exit codes as defined by the BSD project in "sysexits.h".

Please note that the values shown in the documentation are also inserted by the preprocessor and thus technically only valid for the platform this documentation was built on.

As may be evident from the structure here both the integer value for the exit code as well as the ExitCode value (to be used with exitWith) are exposed.

The format for a given code is:

EX_ERRORNAME
Error code CPP macro as defined by the sysexits.h header
exErrorName
Int value for the error
codeErrorName
ExitCode value for the error

The documentation snippets I copied from https://www.freebsd.org/cgi/man.cgi?query=sysexits&apropos=0&sektion=0&manpath=FreeBSD+4.3-RELEASE&format=html.

Synopsis

Documentation

exOk :: Int Source #

successful termination (0)

The successful exit is always indicated by a status of 0, or exOk.

codeOk :: ExitCode Source #

successful termination (0)

exUsage :: Int Source #

command line usage error (64)

The command was used incorrectly, e.g., with the wrong number of arguments, a bad flag, a bad syntax in a parameter, or whatever.

codeUsage :: ExitCode Source #

command line usage error (64)

exDataErr :: Int Source #

data format error (65)

The input data was incorrect in some way. This should only be used for user's data and not system files.

codeDataErr :: ExitCode Source #

data format error (65)

exNoInput :: Int Source #

cannot open input (66)

An input file (not a system file) did not exist or was not readable. This could also include errors like "No message" to a mailer (if it cared to catch it).

codeNoInput :: ExitCode Source #

cannot open input (66)

exNoUser :: Int Source #

addressee unknown (67)

The user specified did not exist. This might be used for mail addresses or remote logins.

codeNoUser :: ExitCode Source #

addressee unknown (67)

exNoHost :: Int Source #

host name unknown (68)

The host specified did not exist. This is used in mail addresses or network requests.

codeNoHost :: ExitCode Source #

host name unknown (68)

exUnavailable :: Int Source #

service unavailable (69)

A service is unavailable. This can occur if a support program or file does not exist. This can also be used as a catchall message when something you wanted to do doesn't work, but you don't know why.

codeUnavaiable :: ExitCode Source #

service unavailable (69)

exSoftware :: Int Source #

internal software error (70)

An internal software error has been detected. This should be limited to non-operating system related errors as possible.

codeSoftware :: ExitCode Source #

internal software error (70)

exOsErr :: Int Source #

system error (71)

An operating system error has been detected. This is intended to be used for such things as "cannot fork", "cannot create pipe", or the like. It includes things like getuid returning a user that does not exist in the passwd file.

codeOsErr :: ExitCode Source #

system error (71)

exOsFile :: Int Source #

critical OS file missing (72)

Some system file (e.g., etcpasswd, varrun/utmp, etc.) does not exist, cannot be opened, or has some sort of error (e.g., syntax error).

codeOsFile :: ExitCode Source #

critical OS file missing (72)

exCantCreate :: Int Source #

can't create (user) output file (73)

A (user specified) output file cannot be created.

codeCantCreate :: ExitCode Source #

can't create (user) output file (73)

exIOErr :: Int Source #

input/output error (74)

An error occurred while doing I/O on some file.

codeIOErr :: ExitCode Source #

input/output error (74)

exTempFail :: Int Source #

temp failure; user is invited to retry (75)

Temporary failure, indicating something that is not really an error. In sendmail, this means that a mailer (e.g.) could not create a connection, and the request should be reattempted later.

codeTempFail :: ExitCode Source #

temp failure; user is invited to retry (75)

exProtocol :: Int Source #

remote error in protocol (76)

The remote system returned something that was "not possible" during a protocol exchange.

codeProtocol :: ExitCode Source #

remote error in protocol (76)

exNoPerm :: Int Source #

permission denied (77)

You did not have sufficient permission to perform the operation. This is not intended for file system problems, which should use exNoInput or exNoPerm, but rather for higher level permissions.

codeNoPerm :: ExitCode Source #

permission denied (77)

exConfig :: Int Source #

configuration error (78)

Something was found in an unconfigured or misconfigured state.

codeConfig :: ExitCode Source #

configuration error (78)

Bounds

exBase :: Int Source #

base value for error messages (64)

Error numbers begin at exBase to reduce the possibility of clashing with other exit statuses that random programs may already return.

exMax :: Int Source #

maximum listed value (78)