Skip to content

Conversation

@schultzdavid
Copy link
Collaborator

@schultzdavid schultzdavid commented Nov 14, 2025

Since the outer CATCH statement serves no function here, I think the example will be more transparent without that keyword (i.e. with only {} instead of CATCH {}).

I guess one could try to cook something up with two nested CATCHes that illustrates how the outer CATCH block does give back control to the encompassing (main) block. However, as the example is now, neither of the CATCH blocks even gets entered in the first place, because no Failure is thrown in the main block. So removing the CATCH word before the outer block is an improvement.

@schultzdavid schultzdavid marked this pull request as draft November 14, 2025 13:24
@schultzdavid schultzdavid marked this pull request as ready for review November 14, 2025 13:33
@schultzdavid schultzdavid marked this pull request as draft November 14, 2025 13:54
for more information on this.

A C<try>-block is a normal block and as such treats its last statement
A C<try> block is a normal block and as such treats its last statement
Copy link
Collaborator

Choose a reason for hiding this comment

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

As long as we’re in here: I think “and as such, uses its last statement as its return value.” reads better - if you agree, please add that update.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh yes, definitely.

@schultzdavid schultzdavid changed the title In exceptions.rakudoc, remove CATCH keyword where all that matters is the block In exceptions.rakudoc, remove CATCH keyword. Plus some stylistic improvements. Nov 14, 2025
@schultzdavid schultzdavid marked this pull request as ready for review November 14, 2025 20:57
@schultzdavid schultzdavid changed the title In exceptions.rakudoc, remove CATCH keyword. Plus some stylistic improvements. In exceptions.rakudoc, remove a CATCH keyword. Plus some stylistic improvements. Nov 15, 2025
@coke coke merged commit f3903e6 into main Nov 17, 2025
1 check passed
@coke coke deleted the schultzdavid-patch-6 branch November 17, 2025 22:02
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.

3 participants