Invalid parameter to function call exceptional–conditions are used to signal a programming error. Example:
function myfunc () { mbfl_mandatory_parameter(MOOD, 1, the mood) if ! some_predicate "$MOOD" then mbfl_default_object_declare(CND) mbfl_invalid_function_parameter_condition_make _(CND) \ $FUNCNAME 'expected good value' 1 'MOOD' "$MOOD" mbfl_exception_raise _(CND) return_because_failure fi # do something }
Usually when an exceptional–condition of this class is raised, the correct handling is to: attempt a clean release of all the resources; inform the user; terminate the program with an appropriate exit status.
• conditions invalid parameter class: | Class definition of mbfl_invalid_function_parameter_condition .
| |
• conditions invalid parameter constructors: | Class constructors of mbfl_invalid_function_parameter_condition .
| |
• conditions invalid parameter attributes: | Attributes of mbfl_invalid_function_parameter_condition .
|
This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.