Previous: compensations usage, Up: compensations [Contents][Index]
The compensations mechanism is built on top of the unwind protection mechanism:
Allocate a new compensations stack, then evaluate all the ?body forms in the given order. If
no error occurs: call run-compensations
, reset the compensations stack to empty, finally
return the result values of the last ?body form.
If the dynamic extent of the evaluation of the ?body forms is terminated: the accumulated compensations are evaluated in reverse order.
Allocate a new compensations stack, then evaluate all the ?body forms in the given order. If no error occurs: reset the compensations stack to empty, return the result values of the last ?body form.
If the dynamic extent of the evaluation of the ?body forms is terminated by escaping from the body directly or by escaping from the body while handling a raised a exception: the accumulated compensations are evaluated in reverse order.
Evaluate all the compensation thunks in the current stack, in last in/first out order; compensation thunks are called in the current dynamic environment. If a compensation thunk raises an exception: the exception is blocked and silently discarded.
This function should be called only inside the dynamic environment prepared by
with-compensations
and similar syntaxes. It can be called multiple times: every time the
compensation thunks are consumed and removed from the stack.
First push ?release-thunk on the current compensations stack, then evaluate ?alloc-thunk. Return the results of evaluating ?alloc-thunk.
First evaluate all the ?alloc expressions then, only if they perform a normal return: push one thunk holding all the ?release forms on the current compensations stack. Return the result of the last ?alloc expression.
The auxiliary syntax with
is matches with its symbol name.
Push a thunk holding the ?release forms on the current compensations stack.
Push the given thunk on the current compensations stack.
Previous: compensations usage, Up: compensations [Contents][Index]
This document describes version 0.1.0-devel.1 of MMCK Exceptional Conditions.