Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕ERX Error trapping
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

⎕ERX Error trapping


Note: The use of ⎕ERX is now deprecated. We recommend that you use the structured-control error trapping mechanism (:Try :CatchIf :CatchAll :EndTry) instead.

The monadic system function ⎕ERX is followed by a line number. Its effect is to set or clear error trapping. It takes a scalar integer argument which is a line number (or label) in the function. If an error occurs in the error trapped function, or functions called by the error trapped function, control is passed to the specified line. ⎕ERX returns the previous value set.

             [2]  R←⎕ERX ERRLAB
              .
              .
             [20] ERRLAB: 'HALTED, ERROR'
             [21] 'ERROR WAS ',⎕R, ⎕ERM

To switch off error trapping, use an argument of 0.


Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕ERX Error trapping
[ Previous | Next | Contents | Index | APL Home ]