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


5.6 Running location handlers

All the following definitions are accessible from the header file ccexceptions.h.

Function: void cce_run_body_handlers (cce_destination_t L)

Run all the clean handlers associated to the location L. Each handler must return to its caller, taking care of itself regarding internal error handling and asynchronous resources allocation. Handlers are called starting from the last registered one.

This is a destructive function: once the list has been traversed, it is not valid anymore. When the handler function is applied to the handler structure: the handler structure is completely detached from the context of L, so it can be finalised and its memory released.

Function: void cce_run_catch_handlers (cce_destination_t L)

Run all the clean and error handlers associated to the location L. Each handler must return to its caller, taking care of itself regarding internal error handling and asynchronous resources allocation. Handlers are called starting from the last registered one.

This is a destructive function: once the list has been traversed, it is not valid anymore. When the handler function is applied to the handler structure: the handler structure is completely detached from the context of L, so it can be finalised and its memory released.

The clean handlers are invoked first, in reverse order with respect of their registration; the error handlers are invoked last, in reverse order with respect of their registration.

NOTE This function must assume that an error handler might access the exceptional–condition object associated to L upon raising the exception, so this function should always be called before applying cce_condition_delete() to the return value of cce_condition(L).

Function: void cce_run_catch_handlers_final (cce_destination_t L)

Equivalent to calling:

cce_run_catch_handlers(L);
cce_condition_delete(cce_condition(L));
Function: void cce_run_body_handlers_final (cce_destination_t L)

Equivalent to calling:

cce_run_body_handlers(L);
cce_condition_delete(cce_condition(L));
Function: void cce_run_catch_handlers_raise (cce_destination_t L, cce_location_t * upper_L)

Equivalent to calling:

cce_run_catch_handlers(L);
cce_raise(upper_L, cce_condition(L));
Function: void cce_run_body_handlers_raise (cce_destination_t L, cce_location_t * upper_L)

Equivalent to calling:

cce_run_body_handlers(L);
cce_raise(upper_L, cce_condition(L));

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

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