The faulthandler is analyzed if an error occurred in the activity in which it is present or if the activity is switched to the "error" state due to a child activity (see section "Running an Ftscript").
The faulthandler is used if a case activity with the corresponding error code is defined in it or, in the absence of any "severe" error, a default activity is defined (see section "Severe Ftscript error codes").
This case or default activity then replaces the activity in which the faulthandler is located, takes over its context objects and is then executed.
If an error occurs during the execution of the case or default activity, then the original faulthandler is ignored and a suitable faulthandler in the activity's own context or that of its parent activities is used.
Format
<faulthandler> comment? (case* default) | (case+ default?) </faulthandler>
Attributes
See section "case".
Example
|
In this example, the local file source.bin is to be copied to D018S011/taget.bin.
If an implicit error occurs in transferFile then the file is copied to D018S022/target.bin. This overlays the context object with the Id Remote Partner. If another error occurs during this activity then the Ftscript is cancelled.