Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn for "ON ERROR UNDO:" without RETRY/LEAVE/NEXT/RETURN/THROW #1148

Open
lievendf opened this issue Nov 15, 2024 · 0 comments
Open

Warn for "ON ERROR UNDO:" without RETRY/LEAVE/NEXT/RETURN/THROW #1148

lievendf opened this issue Nov 15, 2024 · 0 comments
Assignees

Comments

@lievendf
Copy link

lievendf commented 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.

@gquerret 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
@gquerret gquerret self-assigned this Nov 15, 2024
@gquerret gquerret added the CABL label Nov 15, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants