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

documentation about assigning a try statement with finally clause #56855

Open
ArnoStrouwen opened this issue Dec 17, 2024 · 0 comments
Open

documentation about assigning a try statement with finally clause #56855

ArnoStrouwen opened this issue Dec 17, 2024 · 0 comments
Labels
docs This change adds or pertains to documentation error handling Handling of exceptions by Julia or the user

Comments

@ArnoStrouwen
Copy link
Contributor

From the following examples, it seems like the finally clause is not considered for variable assignment:

tester = try sqrt(1); 1 catch ; 2 finally 3 end
tester = try sqrt(-1); 1 catch ; 2 finally 3 end
tester = try sqrt(1); 1 catch ; 2 else 3 finally 4 end

I can't find where in the documentation this behavior is specified.
https://docs.julialang.org/en/v1/base/base/#finally
https://docs.julialang.org/en/v1/manual/control-flow/#finally-Clauses

@nsajko nsajko added docs This change adds or pertains to documentation error handling Handling of exceptions by Julia or the user labels Dec 29, 2024
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

No branches or pull requests

2 participants