There are 6 types of errors which the REXX interpreter itself automatically checks for (all the while your script is running) and can report to you. We call these "conditions". The names of these 6 conditions are SYNTAX, NOTREADY, ERROR, FAILURE, HALT, and NOVALUE.

Note: If you're familiar with other languages, it is helpful to think of a REXX condition as being analagous to an exception.

A SYNTAX condition happens when there is some mistake you made in notating one of your instructions, such as putting the UPPER keyword before PARSE, or messing up the quote characters in a literal string. A SYNTAX condition can also happen when you pass an incorrect/unrecognized argument to some Function. SYNTAX condition can also happen when there is some operating system failure (other than a failure concerning files/streams), such as not enough memory needed to perform some operation.

A NOTREADY condition happens when there is a problem with some Function that performs an operation upon a file or device, such as LINEIN() not properly reading the next line from a file, or STREAM() failing to open/create a file. This may involve a failure on the part of the operating system's underlying file system.

An ERROR condition happens when there is some error that an add-on Function you call in a DLL, or (non-REXX) program that you run, encounters as a result of doing its work. For example, if you run some program that downloads a web page to a file, and it encounters a problem, an ERROR condition may occur.

Some add-on Functions, or attempts to run a program, may cause a FAILURE condition instead of an ERROR condition, especially if the problem is more severe, such as that aforementioned program not being found on the system.

A HALT condition happens when the person running your script tries to manually abort your script, or some Function you call in a DLL wants your script to abort. (HALT will also be raised when you use Rexx Programmer Center's "Run -> Halt script" menu item).

A NOVALUE condition happens when a variable is used without first having been explicitly assigned a value.

At the moment that a condition actually happens, such as a SYNTAX error being encountered, this is referred to as "raising the condition".

REXX has a default (ie, automatic) way that it handles each of these 6 conditions whenever the condition is raised. For some conditions (such as SYNTAX and HALT), the default handling is to display some information about the nature of the problem, and immediately end your script at the line where the condition occurred. For example, if you have a SYNTAX error in your script due to missing the ending quote on a string, then REXX will abort your script at that line, and display a message telling you that there is "an unmatched quote", and telling you which line had that error.

For other conditions (such as NOVALUE, ERROR, FAILURE, and NOTREADY), the default handling is to do nothing about each and every instance of the condition being raised (so that your script continues executing, with whatever consequences happen as a result of that condition not ever being definitively handled). For example, perhaps you have called LINEOUT to write a line to a file, but there is problem writing the line. If you don't specifically tell REXX to inform you of that problem via the NOTREADY condition (and you don't check the return value from LINEOUT), then your script will carry on and you will never be aware that the data you want saved to the file never really got saved properly. Unlike with a SYNTAX error, REXX will not automatically abort your script (nor display any message) informing you of the problem.