Module Dolmen_loop.Code
Exit codes
Manipulating error codes
val create : string -> tCreate a new exit code. The string given is used as a description for the exit code. The create code is active by default.
val descr : t -> int * stringReturn the actual integer associated to the code,
val errors : unit -> t listReturn the list of all created error exit codes.
Special exit codes
val ok : tThe
0exit code, signalling everything ran fine.
val bug : tUnexpected errors. This uses retcode
125since this is also what cmdliner uses. This code will not appear in the list returned by rrors.
Predefined exit codes
val generic : tGeneric exit code.
val typing : tExit codes for typing errors.
Exit code status
val exit : t -> _Exit with the given code. Note: exit codes can be silenced, in which case the process will exit with an exit code of
0.
val is_abort : t -> boolWhether an exit code is active.
val abort : t -> unitMake the exit code abort instead of properly exiting.
val error : t -> unitMake the exit code properly exit.