Since built-in handle methods treat errors as warnings, you cannot use the IF ERROR-STATUS:ERROR test to detect them. However, even if the ERROR attribute is not set, the error messages are saved in the ERROR-STATUS object. Therefore, if your statement contains a method reference, use this test: IF ERROR-STATUS:NUM-MESSAGES > 0. For example: