Description
The Escape block initiates an exception in a block list with the value of the parameter. This can be used to create exceptions specific to an application or to reissue exceptions in a recover block list. The Escape block does not have a tab on the bottom
because no blocks snap below it. The program redirects to the recover block list of an enclosing Try Recover block instead.
Escapes
The Escape block does not produce any escapes.
Examples
Consider a procedure that performs an automatic operation to produce a part. Machines often need a manual mode for adjustment and testing. Manual modes and Automatic modes need to be exclusive to avoid a manual effect from interfering with an automatic behavior and to prevent an automatic action from surprising
an operator making a machine adjustment. This block list requires automatic mode and generates an exception if the machine is not in automatic mode.
The value provided in the Escape block can be used in recover blocks to note that the issue is this specific problem. Escape Codes in the range of 1 to 999 are reserved for Snap2Motion. Application Escape Codes should start at 1000 and go up.
If a Try Recover block is used it is good practice to reissue any exception not explicitly handled in the recover block so that the exception propagates upward and is not ignored:
Related Topics
Try Recover
Escape Code
Escape Code Constants