package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

Dune Dependency

Authors

Maintainers

Sources

b0-0.0.3.tbz
sha512=d24b09eb520b8b91a1e5715badc9f5bcd6a6ec49c047f719a07afef6b835c128dc63e00c3be73d5353b037f4c3c9f2889e40666b30e297e872e4d011f098394c

doc/b0_b00_kit/B00_cli/Exit/index.html

Module B00_cli.Exit

Program exits.

Common exit codes

ok is the zero exit code.

val no_such_name : B00_std.Os.Exit.t

no_such_name (122) indicates a named entity was not found.

val some_error : B00_std.Os.Exit.t

some_error (123) indicates an indiscriminate error reported on stdout.

val infos : Cmdliner.Term.exit_info list

infos has the infos of Cmdliner.Term.default_exits, no_such_name, some_error and those above.

Evaluating and exiting

val of_eval_result : ?term_error:B00_std.Os.Exit.t -> B00_std.Os.Exit.t Cmdliner.Term.result -> B00_std.Os.Exit.t

of_eval_result ~term_error r is:

  • e if r is Ok e
  • Code c otherwise with c defined by using Term.exit_status_of_status_result using term_error for term errors or Term.exit_status_cli_error if unspecified.
val exit : exec_error:B00_std.Os.Exit.t -> B00_std.Os.Exit.t -> 'a

exit e exits with e. This uses B00_std.Os.Exit.exit and in case of Error _ logs it and exits with exec_error which if given an exit code is then guaranteed to exit.

OCaml

Innovation. Community. Security.