ON phrases are at the bottom of the order of precedence for handling errors. If another error handling construct is used, specifically NO-ERROR or CATCH blocks, the ON phrase is ignored. If there are CATCH blocks, but none of them are compatible with the type of condition that occurs, then the ON phrase takes effect (assuming NO-ERROR is not used on the statement).

In general, the AVM performs error handling using this precedence, from highest to lowest. The AVM only abides by one of these when a condition is raised:

  • Statement NO-ERROR option
  • CATCH block
  • Block’s ON phrase (explicit or implicit)