Some functions and global variables are provided to declare script’s exit codes. MBFL declares
its own exit codes starting from 100 and decreasing; we should declare our exit codes
starting from 3 and increasing. The exit codes 0 and 1 are reserved for the
functions exit_because_success() and exit_because_failure().
Declare an exit code and a return code with value CODE and identifier NAME. This function creates a function and an alias equivalent to the following:
function exit_because_NAME () { mbfl_exit CODE; }
alias return_because_NAME='return CODE;'
the name of the function is the string exit_because_ followed by the exit code name; the name
of the alias is the string return_because_ followed by the exit code name.
Print the code associated to NAME.
A global associative array whose keys are the code names used as NAME argument to
mbfl_declare_exit_code() and whose values are the code values used as CODE argument to
mbfl_declare_exit_code().
By default the exit code 0 is associated to the name success and the exit code
1 is associated to the name failure; so the following functions exist.
In addition, the following functions are predefined; MBFL’s modules define other exit and return functions.
Exit or return with code 100.
Exit or return with code 91.
This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.