-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Exposing UVError doesn't seem right #7841
Comments
Wholeheartedly agree. |
We had a long talk about this today. I think our general consensus was that we definitely want granularity of errors, (e.g. not just reporting everything as a generic The best short-term proposal (e.g. something within scope for 0.4) I can come up with is the following: Create categories of errors that are small enough to be meaningful (e.g.
|
I've been complaining about UVError for some time: #6825 (comment) See also #4744 |
Also, an exception type should describe a problem, not which library threw it. |
I think this is still relevant (the original example still works). UVError is not exported from Base, so is it correct that its OK to put this off past 1.0? |
Agree this should be replaced with SystemError, IOError, etc. |
Shouldn't this be on the 0.7 milestone rather than 1.0? |
Yes I think this could be on the 0.7 milestone, but it's fairly minor since code probably doesn't reference UVError too often. |
In #15879 a subset of However, I'm concerned that baking e.g if the code below was written for Julia 1.0, it would stop working if catch e
if e isa IOError && e.code == UV_EACCES
bar()
else
rethrow(e)
end
end It might be better for catch e
if e isa AbstractIOError && errorcode(e) == UV_EACCES
bar()
else
rethrow(e)
end
end |
Ok so should we just add |
Technically making |
Then perhaps the |
The |
I feel like
UVError
isn't something that should be escaping the Julia internals. For one thing, I doubt anyone not involved with Julia development knows or wants to know what theUV
refers to. Having different exception types thrown from the same method (from the users perspective) feels odd to me, although I think thats a much more debatable point.It bit me recently (I had code like
println(fp, err.msg)
, which threw an error in the error handler...) and I just saw #7822 which made me think of it again.The text was updated successfully, but these errors were encountered: