Next: handlers init, Up: handlers [Contents][Index]
All the following definitions are accessible from the header file ccexceptions.h.
Opaque structures representing clean and error handlers. Instances of this type:
cce_init_handler(), which registers the asynchronous
resource to be finalised.
cce_register_handler().
cce_init_and_register_handler().
Clean handlers are invoked by calling one of the functions: cce_run_body_handlers(),
cce_run_catch_handlers() and its variants cce_run_catch_handlers_final() and
cce_run_catch_handlers_raise().
Error handlers are invoked by calling the function cce_run_catch_handlers() or one of its
variants, cce_run_catch_handlers_final() and cce_run_catch_handlers_raise().
When an exception is raised: both the clean handlers and the error handlers are invoked; 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.
It is strongly advised to allocate instances of these types on the call stack, near the associated
cce_location_t instance, rather than to put them into dynamically allocated memory.
Type of exception handler functions meant to release some asynchronous resource. The argument C references a structure representing the raised exceptional–condition object; the handler must leave it untouched, it must not mutate or release it. The argument H references the handler context; the handler must leave it untouched, it must not mutate it.
This function might call the destructor function registered in H, if any.
If an error occurs: the handler function must take care of itself and return to the caller, it must not raise an exceptional condition and jump to a remote location.
An alias for void. We can use it in pointer cast operations to make the code more readable.
Type of client data destructor functions meant to destroy some ansynchronous resource. The argument pointer references the client data to destroy.
If an error occurs destroying some data: the destructor function must take care of itself and return to the caller, it must not raise an exceptional condition and jump to a remote location.
Cast the POINTER to cce_resource_data_t * and return it. We can use this macro to make
the code more readable when initialising exception handlers.
Cast the POINTER to cce_resource_destructor_fun_t * and return it. We can use this
macro to make the code more readable when initialising exception handlers.
Next: handlers init, Up: handlers [Contents][Index]
This document describes version 0.9.0-devel.3 of CCExceptions.