P99

◆ P99_FINALLY

#define P99_FINALLY
Value:
P00_FINALLY \
P00_BLK_AFTER(p00_unw ? P99_RETHROW : P99_NOP)

Designate a block that is executed regardless of the exceptions that were encountered in the corresponding try block.

Remarks
If the finally clause was reached via the catching of an exception, the unwind of P99_TRY and P99_UNWIND_PROTECT blocks will continue. Otherwise execution will resume normally after the P99_FINALLY clause.

A typical use pattern will be as follows:

// do some cleanup
}
// continue only if no exception had been caught
See also
P99_TRY
P99_CATCH
Warning
Utilities that change control flow in an unexpected way may result in the loss of some modifications that are effected on variables. A modern compiler should tell you when you are in such a situation. If it is the case you'd have to declare the variable in question with the volatile qualifier. For an explanation see P99_UNWIND_PROTECT.

Definition at line 630 of file p99_try.h.

P99_FINALLY
#define P99_FINALLY
Designate a block that is executed regardless of the exceptions that were encountered in the correspo...
Definition: p99_try.h:630
P99_NOP
#define P99_NOP
Do nothing.
Definition: p99_block.h:297
P99_RETHROW
#define P99_RETHROW
Stop execution at the current point inside a P99_FINALLY or P99_CATCH clause and propagate the same e...
Definition: p99_try.h:495