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

NIOCore: handle error description on Windows #2219

Merged
merged 2 commits into from
Jul 7, 2022
Merged

Conversation

compnerd
Copy link
Contributor

@compnerd compnerd commented Jul 5, 2022

We would previously attempt to convert an error to a description without
consideration for the provenance on Windows. This would result in a
failure if the error code was not from errno. Account for the source
of the error and translate it appropriately. We can not retrieve
descriptions on errors that may originate from Windows or WinSock as
well as the C library.

@Lukasa Lukasa added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Jul 6, 2022
@Lukasa Lukasa enabled auto-merge (squash) July 6, 2022 07:56
Sources/NIOCore/IO.swift Outdated Show resolved Hide resolved
@Lukasa Lukasa disabled auto-merge July 6, 2022 07:57
We would previously attempt to convert an error to a description without
consideration for the provenance on Windows.  This would result in a
failure if the error code was not from `errno`.  Account for the source
of the error and translate it appropriately.  We can not retrieve
descriptions on errors that may originate from Windows or WinSock as
well as the C library.
@Lukasa Lukasa merged commit 48916a4 into apple:main Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants