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

RFC: rename UVError to IOError #28287

Merged
merged 1 commit into from
Jul 30, 2018
Merged

RFC: rename UVError to IOError #28287

merged 1 commit into from
Jul 30, 2018

Conversation

JeffBezanson
Copy link
Sponsor Member

fixes #7841

This is a bit tricky because the error sources we have use libuv-specific codes. So I tried this approach:

  1. Rename UVError to IOError. It still has an integer code, but the code should be considered implementation-defined.
  2. When libuv wrapper code throws an error, it uses the constructor _UVError(...). That function converts the error code to a message using the knowledge that it's a libuv code.

That way you always consume IOErrors, and they're self contained, but you can still use the code if you happen to know what it means.

@JeffBezanson JeffBezanson added domain:io Involving the I/O subsystem: libuv, read, write, etc. kind:deprecation This change introduces or involves a deprecation labels Jul 26, 2018
@JeffBezanson JeffBezanson force-pushed the jb/UVError branch 2 times, most recently from 41efb9c to 04f4db2 Compare July 26, 2018 21:37
@JeffBezanson
Copy link
Sponsor Member Author

I should have marked this for triage. @Keno @vtjnash any objections?

@JeffBezanson JeffBezanson added the status:triage This should be discussed on a triage call label Jul 29, 2018
@ararslan ararslan mentioned this pull request Jul 30, 2018
13 tasks
@JeffBezanson JeffBezanson added this to the 0.7 milestone Jul 30, 2018
@StefanKarpinski
Copy link
Sponsor Member

Yes, just do it.

@JeffBezanson JeffBezanson merged commit 0432866 into master Jul 30, 2018
@JeffBezanson JeffBezanson deleted the jb/UVError branch July 30, 2018 20:39
@JeffBezanson JeffBezanson removed the status:triage This should be discussed on a triage call label Jul 30, 2018
@samoconnor
Copy link
Contributor

See #7841 (comment) -- Should IOError be abstract to allow future addition of fine-grained error types in a non-breaking way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:io Involving the I/O subsystem: libuv, read, write, etc. kind:deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exposing UVError doesn't seem right
3 participants