Next: , Previous: , Up: Top   [Contents][Index]


5 The location handlers API

Location handlers allow us to execute callback functions whenever we exit a location context, represented by an instance of cce_location_t, either by normal execution or by raising an exception. Before terminating the use of a cce_location_t instance: we must always call the handlers, whether or not an exception was raised.

Normal–execution handlers are run by calling the function cce_run_body_handlers(); exception–reaction handlers are run by calling the function cce_run_catch_handlers(), but we should use the more useful functions cce_run_catch_handlers_final() and cce_run_catch_handlers_raise().

CCExceptions defines clean handlers, which are run as both normal–execution and exception–reaction handlers; it also defines error handlers, which are run only as exception–reaction handlers.


Next: , Previous: , Up: Top   [Contents][Index]

This document describes version 0.9.0-devel.3 of CCExceptions.