http://www.aros.orgAROS-ExecAROS-Exec ArchivesPower2People
kitty mascottop logo menu


Index Prev Next




FailAt <limit>




FailAt sets the return code limit of the current shell script. If
any command returns with a failure code of this value or higher
the script shall abort.

Common failure codes are:
    0   - No error
    5   - Warning
    10  - Error
    20  - Failure

The normal value for the return code limit is 10.


If we have a script with the commands

    Copy RAM:SomeFile DF0:
    Echo "Done!"

and the file RAM:SomeFile does not exist, the Copy command will
return with:

    Copy: object not found
    Copy: returned with error code 20

and the script will abort. However if you include the command

    FailAt 21

then the script will complete since the return code from Copy is
less than the return code limit.


If this command is called in a script that is executed from another
script, the new fail level will be inherited by the parent script.

Copyright © 1995-2018, The AROS Development Team. Tutti i diritti riservati.
Amiga® č un marchio registrato di Amiga Inc. Tutti i diritti sui marchi vanno ai legittimi proprietari.