You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2020. It is now read-only.
file = open("filename")
try
# read file
catch err
# report err
finally
if file !== nothing
close(file)
end
end
But the whole point of a manual is that readers shouldn't have to guess:-)
Also, if there's a way to do this more nicely for files (like the open(f::Function... example shown earlier but built-in or in the std. lib.), it should be mentioned and linked to.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In http://docs.julialang.org/en/latest/manual/control-flow.html
it explains that try ... catch and try ... finally can be combined. I'm guessing that this means something like:
But the whole point of a manual is that readers shouldn't have to guess:-)
Also, if there's a way to do this more nicely for files (like the open(f::Function... example shown earlier but built-in or in the std. lib.), it should be mentioned and linked to.
The text was updated successfully, but these errors were encountered: