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

document finally in try/catch #54269

Merged
merged 6 commits into from
May 24, 2024
Merged

document finally in try/catch #54269

merged 6 commits into from
May 24, 2024

Conversation

stevengj
Copy link
Member

As noted on discourse, the try docstring should at least briefly mention finally.

@stevengj stevengj added docs This change adds or pertains to documentation error handling Handling of exceptions by Julia or the user labels Apr 26, 2024
Copy link
Contributor

@Seelengrab Seelengrab left a comment

Choose a reason for hiding this comment

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

LGTM

@jariji
Copy link
Contributor

jariji commented Apr 28, 2024

This PR copies from the finally docstring. In both places it shows how to combine try with finally but not how to combine try/catch with finally. Eg if you've never seen finally before, you might wonder is it try/finally/catch or try/catch/finally or what. Suggested fix: include a try/catch/finally example.

@stevengj
Copy link
Member Author

I added a catch block to the example.

Co-authored-by: Sukera <11753998+Seelengrab@users.noreply.github.com>
@fingolfin fingolfin merged commit eec6866 into master May 24, 2024
7 checks passed
@fingolfin fingolfin deleted the stevengj-patch-3 branch May 24, 2024 23:35
DilumAluthge pushed a commit that referenced this pull request Jun 3, 2024
As noted [on
discourse](https://discourse.julialang.org/t/try-catch-online-help/113532),
the `try` docstring should at least briefly mention `finally`.

---------

Co-authored-by: Sukera <11753998+Seelengrab@users.noreply.github.com>
lazarusA pushed a commit to lazarusA/julia that referenced this pull request Jul 12, 2024
As noted [on
discourse](https://discourse.julialang.org/t/try-catch-online-help/113532),
the `try` docstring should at least briefly mention `finally`.

---------

Co-authored-by: Sukera <11753998+Seelengrab@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants