12.6 Runtime–error exceptional–condition objects

Runtime error exceptional–conditions are used to signal a runtime error: usually some sort of synchronisation problem between the current process and some other process or the user itself. For example: file system errors; input/output errors; invalid file contents; invalid user requests. We can use them as follows:

mbfl_default_object_declare(CND)

mbfl_runtime_error_condition_make _(CND) 'someone' 'internal error'
mbfl_exception_raise _(CND)

Usually when an exceptional–condition of this class is raised, the correct handling is to: attempt a clean release of all the associated resources; inform the user; if appropriate continue script’s execution, otherwise terminate the process with a meaningful exit status.


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