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

AFD failure now sources underlying I/O error #175

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

notgull
Copy link
Member

@notgull notgull commented Jan 8, 2024

Previously, if AFD failed to initialize polling would return a custom
I/O error with a string error, containing the formatted version of the
underlying system error. However, this means that information about the
underlying system error is lost to the user.

This commit makes it so the returned io::Error wraps a user
inaccessible type: AfdError. This AfdError, when stringified,
returns a similar error message as what was previously returned. In
addition when .source() is used it returns the underlying system
error.

Closes #174

Previously, if AFD failed to initialize `polling` would return a custom
I/O error with a string error, containing the formatted version of the
underlying system error. However, this means that information about the
underlying system error is lost to the user.

This commit makes it so the returned `io::Error` wraps a user
inaccessible type: `AfdError`. This `AfdError`, when stringified,
returns a similar error message as what was previously returned. In
addition when `.source()` is used it returns the underlying system
error.

Closes #174

Signed-off-by: John Nunley <dev@notgull.net>
@notgull notgull merged commit ea5a38a into master Jan 9, 2024
24 checks passed
@notgull notgull deleted the notgull/afd-err branch January 9, 2024 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

When AFD is unsupported, return an error that can be traced back to the original I/O error
1 participant