Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

fault

&pagelevel(3)&pagelevel

You use fault to cancel the parent activity (and all its running child activities) with a userdefined error code and continue execution in the corresponding faulthandler. The faulthandler of the parent activity is processed first.

The error is intercepted with the appropriate faulthandler (default or case) (see section “faulthandler”). The activity associated with the faulthandler is executed.

All file transfer requests that were started by the parent activity and are still running are also cancelled (ft_cancel). This may result in the execution of the remoteFailureScript (see section “remoteFailureScript”).

If it is not possible to assign a faulthandler to the error code then the entire script is aborted.

Restrictions

The error code must not start with "ft_". These error codes are reserved for openFT-Script.

Format

 <fault code="faultcode">
   comment?
 </fault>

Attributes

Name

Value

Meaning

code

Text

The error code which can be intercepted in a faulthandler.

Example

 <?xml version="1.0" encoding="UTF-8"?>
 <ftscript version="1">
   <parallel>
     <context>
       <partner id="remote" name="UnixP_1">
         <transferAdmission>
           <ftacAdmission ftacAdmission="FTACADM1"/>
         </transferAdmission>
       </partner>
       <faulthandler>
         <case code="intercept">
           <deleteFile name="target1.bin">
             <partner ref="remote"/>
             <directory name="frg_eis_08NotAvailable"/>
           </deleteFile>
           <deleteFile name="target2.bin">
             <partner ref="remote"/>
             <directory name="frg_eis_08"/>
           </deleteFile>
         </case>
       </faulthandler>
     </context>
     <transferFile>
       <context>
         <faulthandler>
          <default>
             <fault code="intercept"/>
           </default>
         </faulthandler>
       </context>
       <fromLocalFile name=
 "W:/openFT/ftscript/Test/data/small/bin.mp3"/>
       <toRemoteFile name="target1.bin">
         <partner ref="remote"/>
         <directory name="frg_eis_08NotAvailable"/>    
       </toRemoteFile>
     </transferFile>
     <transferFile>
       <context>
         <faulthandler>
           <default>
             <fault code="intercept"/>
           </default>
         </faulthandler>
       </context>
       <fromLocalFile name=
 "W:/openFT/ftscript/Test/data/large/bin.mp3"/>
       <toRemoteFile name="target2.bin">
         <partner ref="remote"/>
         <directory name="frg_eis_08"/>
       </toRemoteFile>
     </transferFile>
   </parallel>
 </ftscript>

Two file transfers are performed in parallel.
If an error occurs during one of the transfers then this is indicated by the error code intercept. This is intercepted in the faulthandler.
The other file transfer is cancelled (ft_cancel).
The two target files are deleted in the faulthandler. Any errors which occur are ignored.

Using this script either both files or neither of the files reach their destination.

If a remoteFailureScript is defined for the file transfer which is cancelled by means of

ft_cancel then this may continue to run even when the faulthandler is already active.