Module Cmd.ExitSource
Exit codes and their information.
Exit codes
The type for exit codes.
Warning. You should avoid status codes strictly greater than 125 as those may be used by some shells.
val ok : OpamCmdliner.Cmd.Exit.codeok is 0, the exit status for success.
val some_error : OpamCmdliner.Cmd.Exit.codesome_error is 123, an exit status for indisciminate errors reported on stderr.
val cli_error : OpamCmdliner.Cmd.Exit.codecli_error is 124, an exit status for command line parsing errors.
val internal_error : OpamCmdliner.Cmd.Exit.codeinternal_error is 125, an exit status for unexpected internal errors.
Exit code information
val info :
?docs:string ->
?doc:string ->
?max:OpamCmdliner.Cmd.Exit.code ->
OpamCmdliner.Cmd.Exit.code ->
OpamCmdliner.Cmd.Exit.infoexit_info ~docs ~doc min ~max describe the range of exit statuses from min to max (defaults to min). doc is the man page information for the statuses, defaults to "undocumented". docs is the title of the man page section in which the statuses will be listed, it defaults to Manpage.s_exit_status.
In doc the documentation markup language can be used with following variables:
$(status), the value ofmin.$(status_max), the value ofmax.- The variables mentioned in the
Cmd.info
val info_code : OpamCmdliner.Cmd.Exit.info -> OpamCmdliner.Cmd.Exit.codeinfo_code i is the minimal code of i.
val defaults : OpamCmdliner.Cmd.Exit.info listdefaults are exit code information for ok, some_error cli_error and internal_error.