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

On fail support for statements other than regular-compound-stmt #1157

Closed
pcnfernando opened this issue Aug 29, 2022 · 3 comments
Closed

On fail support for statements other than regular-compound-stmt #1157

pcnfernando opened this issue Aug 29, 2022 · 3 comments
Assignees
Labels
implementation/done Implementation Done lang Relates to the Ballerina language specification
Milestone

Comments

@pcnfernando
Copy link
Member

Description:
Relates to https://ballerina.io/spec/lang/master/#stmt-with-on-fail

With the current implementation, we have mistakenly added support for having on-fail for transaction and retry based on #337 (comment).

We anyway can wrap transaction within a do-onfail to achieve the same behavior.
I was wondering whether it makes sense to have this sugaring for error handling of transaction blocks specifically.

Suggested Labels:

Code sample that shows issue:

Related Issues:
Raised a lang issue as the current implementation has a spec deviation
ballerina-platform/ballerina-lang#37315.

@jclark jclark self-assigned this Aug 30, 2022
@jclark
Copy link
Collaborator

jclark commented Aug 30, 2022

At first sight, what the implementation is doing seems reasonable. Let me look at this in more detail.

@jclark jclark added the lang Relates to the Ballerina language specification label Aug 30, 2022
@jclark jclark added this to the Swan Lake Update 3 milestone Aug 30, 2022
@jclark
Copy link
Collaborator

jclark commented Aug 30, 2022

Concretely issue is whether the grammar should have

retry-stmt
| transaction-stmt
| retry-transaction-stmt

in regular-compound-stmt rather than statement.

@jclark
Copy link
Collaborator

jclark commented Dec 7, 2022

This also needs some wording changes. We need to consider retry X on fail Y as lexically enclosing retry X.

@jclark jclark modified the milestones: 2023R1, 2013R2 Apr 25, 2023
@jclark jclark modified the milestones: 2013R2, 2023R1 Jun 16, 2023
@MaryamZi MaryamZi added the implementation/done Implementation Done label Feb 12, 2024
@jclark jclark closed this as completed in 91f83ff Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementation/done Implementation Done lang Relates to the Ballerina language specification
Projects
None yet
Development

No branches or pull requests

3 participants