Shell Commands/Failat

From MorphOS Library

< Shell Commands

FailAt - Changes failure limit for scripts (0=Ok, 5=Warn, 10=Error)

RCLIM/N

                                                                               
RCLIM - Return Code Limit (initial value: 10)

Commands indicate that they have failed by setting a nonzero return code. The return code, normally 5, 10, or 20, indicates the severity of the error. A return code greater than or equal to a certain limit, the fail limit, terminates a sequence of non-interactive commands (commands specified after RUN or in a script).

Use the FailAt command to alter the fail limit RCLIM (Return Code Limit) from its initial value of 10. If you increase the limit, you indicate that certain classes of error should not be regarded as fatal and that execution of subsequent commands can proceed after the error. The argument must be a positive number. The fail limit is reset to the initial value of 10 on exit from the command sequence.