You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default behavior of an "ON ERROR UNDO:" block is RETRY, but if you specify ROUTINE-LEVEL/BLOCK-LEVEL then the default becomes LEAVE!
"RETRY is the default processing if you do not use LEAVE, NEXT, RETRY, or RETURN. "
"For callable blocks, including procedures, user-defined functions, class-based methods, and property accessors use the ROUTINE-LEVEL ON ERROR phrase. All of these blocks have a default ON ERROR setting of UNDO, LEAVE."
gquerret
changed the title
Rule suggestion - warn for "ON ERROR UNDO:" without RETRY/LEAVE/NEXT/RETURN/THROW
Warn for "ON ERROR UNDO:" without RETRY/LEAVE/NEXT/RETURN/THROW
Nov 15, 2024
The default behavior of an "ON ERROR UNDO:" block is RETRY, but if you specify ROUTINE-LEVEL/BLOCK-LEVEL then the default becomes LEAVE!
"RETRY is the default processing if you do not use LEAVE, NEXT, RETRY, or RETURN. "
"For callable blocks, including procedures, user-defined functions, class-based methods, and property accessors use the ROUTINE-LEVEL ON ERROR phrase. All of these blocks have a default ON ERROR setting of UNDO, LEAVE."
https://docs.progress.com/bundle/openedge-abl-reference-117/page/ON-ERROR-phrase.html
A rule to warn for this would be useful and could be used to enforce specifying one of the options explicitly.
The text was updated successfully, but these errors were encountered: