Usage of NO-ERROR
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
One way to handle an error condition is to use the NO-ERROR option on specific ABL statements. This only applies to ERROR conditions, not to STOP or QUIT conditions. It should be used
when an error might be expected from a specific statement and you can take some
programmatic action when the expected error occurs.
A common example is using NO-ERROR on the
FIND statement. You might be looking for a record
based on certain criteria and there may, or may not, be any records that satisfy that
criteria. If there are not, you can modify the criteria and try the FIND again, or you can inform the user to pick a different
option to search on. In either case, there is an action to be taken based on this
specific ERROR condition.