Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unwrap the underlying PyErr when converting an io::Error back to a PyErr #3402

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

Tpt
Copy link
Contributor

@Tpt Tpt commented Aug 18, 2023

Exposes it directly instead of loosing all information outside the message

This is useful for use cases like "wrap Python I/O in a io::Read Rust trait" where the python exception are converted to io::Error then converted again to exceptions

Exposes it directly instead of loosing all information outside the message
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 from me; we do similar stuff with anyhow errors.

@adamreichold adamreichold added this pull request to the merge queue Aug 18, 2023
Merged via the queue into PyO3:main with commit 94f1567 Aug 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants