12.3.2 Class constructors of mbfl_warning_condition

Constructor on mbfl_warning_condition_t: mbfl_warning_condition_make CND WHO MESSAGE

Define an object previously declared with mbfl_default_object_declare or similar. Objects built by this constructor are continuable.

who of mbfl_exceptional_condition for the semantics of the parameter WHO.

message of mbfl_exceptional_condition for the semantics of the parameter MESSAGE.

mbfl_default_object_declare(CND)

mbfl_warning_condition_make _(CND) 'someone' 'living dangerously'
mbfl_warning_condition_p _(CND)
⇒ 0
Constructor on mbfl_warning_condition_t: mbfl_warning_condition_define CND WHO MESSAGE CONTINUABLE

Define an object previously declared with mbfl_default_object_declare or similar. This is a low–level constructor that should not be used directly by client code.

who of mbfl_exceptional_condition for the semantics of the parameter WHO.

message of mbfl_exceptional_condition for the semantics of the parameter MESSAGE.

continuable of mbfl_exceptional_condition for the semantics of the parameter CONTINUABLE.

We can use this constructor to define high–level constructors as follows:

function mbfl_warning_condition_for_danger_make () {
    mbfl_mandatory_nameref_parameter(CND, 1, exceptional-condition object)
    mbfl_mandatory_parameter(WHO, 2, entity raising the exceptional-condition)

    mbfl_warning_condition_define _(CND) "$WHO" 'starting dangerous situation' 'true'
}

This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.