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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

document finally in try/catch #54269

wants to merge 6 commits into from

Conversation

stevengj
Copy link
Member

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

@stevengj stevengj added domain:docs This change adds or pertains to documentation domain: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.

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

Successfully merging this pull request may close these issues.

None yet

4 participants