protect statement unwind statement
If no error occurs, the result of evaluating the protect statement and the unwind statement. If an error occurs, the result of the unwind statement only.
This function ensures that a piece of code will be evaluated, even if an error occurs within the protect statement code. This is typically used when an error might occur but cleanup code has to be evaluated even in the event of an error. The error condition will not be cleared by this statement. If an error occurs, control will be passed to the innermost trap_error function or to the outer level error handler immediately after the unwind statement is evaluated.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.