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

Some file operations return undocumented UVError #14260

Closed
eschnett opened this issue Dec 4, 2015 · 2 comments
Closed

Some file operations return undocumented UVError #14260

eschnett opened this issue Dec 4, 2015 · 2 comments
Labels
error handling Handling of exceptions by Julia or the user

Comments

@eschnett
Copy link
Contributor

eschnett commented Dec 4, 2015

I assumed that failing file operations (rm, 'mkdir, etc.) return a SystemError when they fail. However, under certain circumstances they return an undocumented UVError. This seems like an unintentional leak of an implementation detail:

julia> try rm("a") catch err info(typeof(err)) end
INFO: Base.UVError
julia> try chmod("a", 0) catch err info(typeof(err)) end
INFO: Base.UVError

The printed error messages look fine, but e.g. the error codes have different meanings (SystemError uses errno, UVError uses its own set of constants). Having different exception types makes it difficult to handle these errors programmatically.

@kshyatt kshyatt added the error handling Handling of exceptions by Julia or the user label Dec 4, 2015
@IainNZ
Copy link
Member

IainNZ commented Dec 4, 2015

Duplicate of #7841, I think

@IainNZ IainNZ closed this as completed Dec 4, 2015
@samoconnor
Copy link
Contributor

See also #14972

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

No branches or pull requests

4 participants