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


5.7.2 Using a clean handler to run error handlers

Function: void cce_register_clean_handler_to_run_catch_handlers (cce_destination_t inner_L, cce_clean_handler_t * inner_H, cce_destination_t outer_L)

Register the clean handler inner_H, in the context of the location inner_L, so that it will run the error handlers registered for the location outer_L. The exceptional–condition object associated to outer_L will be deleted by the handler.

We can use this function as follows:

cce_location_t  outer_L[1];

if (cce_location(outer_L)) {
  /* outer exception handler */
  cce_location_t       inner_L[1];
  cce_clean_handler_t  inner_H[1];

  if (cce_location(inner_L)) }
    /* inner exception handler */
    cce_run_catch_handlers_final(inner_L);
  } else {
    cce_register_clean_handler_to_run_catch_handlers(inner_L, inner_H,
      cce_resource_pointer(outer_L));
    /* inner body */
    cce_run_body_handlers(inner_L);
  }
} else {
  /* outer body */
  cce_run_body_handlers(outer_L);
}

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

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