NO-ERROR option

NO-ERROR
If an error occurs on the statement with NO-ERROR, the AVM undoes the action of the statement and continues execution with the next statement rather than raising ERROR. In addition, all error messages are diverted to the ERROR-STATUS system handle rather than being displayed to the current output device. The information stored in the ERROR-STATUS system handle remains until the next statement using NO-ERROR. To check for errors after a statement that uses the NO-ERROR option:
  • Check the ERROR-STATUS:ERROR attribute to see if an error was encountered during the execution of the statement. Note however that sometimes errors are treated as warnings and ERROR-STATUS:ERROR is not set.
  • Alternatively, check if the ERROR-STATUS:NUM-MESSAGES attribute is greater than zero to see if the AVM generated error or warning messages.
  • Use ERROR-STATUS:GET-MESSAGE( message-num ) to retrieve a particular message, where message-num is 1 for the first message.

NO-ERROR has no effect when a STOP or QUIT condition occurs.

If an error object is thrown to a statement that includes the NO-ERROR option, the information and messages in the error object are used to set the ERROR-STATUS system handle.

For more information on using NO-ERROR and error handling in general, see OpenEdge Development: ABL Error Handling.

See also

Assignment (=) statement, ASSIGN statement, BUFFER-COMPARE statement, BUFFER-COPY statement, Class-based method call, COMPILE statement, CONNECT statement, COPY-LOB statement, CREATE automation object statement, CREATE CALL statement, CREATE DATABASE statement, CREATE SAX-ATTRIBUTES statement, CREATE SAX-READER statement, CREATE SAX-WRITER statement, CREATE SERVER-SOCKET statement, CREATE SOCKET statement, CREATE statement, CREATE WIDGET-POOL statement, DDE ADVISE statement, DDE EXECUTE statement, DDE GET statement, DDE INITIATE statement, DDE REQUEST statement, DDE SEND statement, DDE TERMINATE statement, DELETE OBJECT statement, DELETE PROCEDURE statement, DELETE statement, DELETE WIDGET-POOL statement, DISCONNECT statement, DISPLAY statement, DYNAMIC-NEW statement, EXTENT statement, FIND statement, IMPORT statement, EMPTY TEMP-TABLE statement, INSERT statement, LOAD statement, NEW statement, Publish( ) event method, PUT-KEY-VALUE statement, RAW-TRANSFER statement, RELEASE OBJECT statement, RELEASE statement, REPOSITION statement, RUN STORED-PROCEDURE statement, RUN SUPER statement, SAVE CACHE statement, SET statement, SUBSCRIBE statement, Subscribe( ) event method, SUPER system reference, UNLOAD statement, Unsubscribe( ) event method, UPDATE statement, USE statement, VALIDATE statement