Previous: handlers running, Up: handlers [Contents][Index]
It is sometimes useful to execute complex code in an exception–handler code block; for example we may need to map a set of exceptional–condition objects into another set. Whenever an exception–handler code block needs to handle exceptions itself, we must register the outer handlers as inner handlers; CCExceptions offers functions to do this with ease.
The basic code template is this:
cce_location_t outer_L[1];
if (cce_location(outer_L)) {
/* outer exception handler */
cce_location_t inner_L[1];
if (cce_location(inner_L)) }
/* inner exception handler */
cce_run_catch_handlers_final(inner_L);
} else {
/* inner body */
cce_run_body_handlers(inner_L);
}
} else {
/* outer body */
cce_run_body_handlers(outer_L);
}
| • handlers handlers cc | Using a clean handler to run clean handlers. | |
| • handlers handlers ce | Using a clean handler to run error handlers. | |
| • handlers handlers ec | Using an error handler to run clean handlers. | |
| • handlers handlers ee | Using an error handler to run error handlers. |
Previous: handlers running, Up: handlers [Contents][Index]
This document describes version 0.9.0-devel.3 of CCExceptions.