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

Clarify catchless try in explainer #168

Merged
merged 5 commits into from
Jun 29, 2021

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Jun 28, 2021

  • Removes the sentence that catchless try is the same as a regular
    block, because it can be targetted by delegate.
  • Improves a few sentences
  • Adds examples for catchless try

Closes #164.

- Removes the sentence that catchless `try` is the same as a regular
`block`, because it can be targetted by `delegate`.
- Improves a few sentences
- Adds examples for catchless try

Closes WebAssembly#164.
proposals/exception-handling/Exceptions.md Outdated Show resolved Hide resolved
@@ -258,6 +258,18 @@ end
The `rethrow` here references `try $l2`, but the `rethrow` is not within its
`catch` block.

Also, targetting a label of `catch`-less `try` or `try`-`delegate` is also a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't see the relevance of the "catch-less" here, I think it's misleading: the example is a validation failure regardless of whether you add a catch clause or not. Both examples are invalid simply because rethrow does not reference a catch-block, no other reason.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the whole added paragraph here about rethrow is not really meaningful and also misleading as you suggested. This PR's goal was to clarify about catchless try and its relationship w/ delegate, so I'll delete this whole paragraph and example.

@@ -258,6 +258,18 @@ end
The `rethrow` here references `try $l2`, but the `rethrow` is not within its
`catch` block.

Also, targetting a label of `catch`-less `try` or `try`-`delegate` is also a
validation failure, because `rethrow` is not within a `catch` or `catch_all`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is confusing as well: even if there was a surrounding catch somewhere it would still be invalid. Whether a catch exists is irrelevant, it only matters whether the rethrow references a catch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted.

aheejin and others added 2 commits June 29, 2021 02:03
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
@aheejin aheejin merged commit 6d71748 into WebAssembly:master Jun 29, 2021
@aheejin aheejin deleted the catchless_try_more branch June 29, 2021 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Behavior for try-delegate targeting catch-less try?
2 participants