12.10 Invalid operation outside location exceptional–condition objects

Invalid operation outside location exceptional–conditions are used to signal a programming error. For example: an attempt to push a location handler outside any location. We can use them as follows:

mbfl_default_object_declare(CND)

mbfl_outside_location_condition_make _(CND) 'someone' 'attempt to push a handler outside any location'
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 resources; inform the user; terminate the program with an appropriate exit status.


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