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

Propagate exceptions #165

Merged
merged 3 commits into from
Jan 21, 2025
Merged

Propagate exceptions #165

merged 3 commits into from
Jan 21, 2025

Conversation

AdamVe
Copy link
Member

@AdamVe AdamVe commented Jan 20, 2025

Fixes #158

This unifies exception handling during UsbYubiKeyDevice.requestConnection. As the linked issue points out, any Exception which is not an IOException in not propagate throughout the Result to the caller.

The behavior has been updated to be same as in NfcYubiKeyDevice.

@dainnilsson
Copy link
Member

Would it be useful to preserve the original exception as the cause of the new IOException?

@AdamVe
Copy link
Member Author

AdamVe commented Jan 21, 2025

Would it be useful to preserve the original exception as the cause of the new IOException?

That is a good idea! Better than just the message.

@AdamVe AdamVe merged commit 401cadd into main Jan 21, 2025
16 checks passed
@AdamVe AdamVe deleted the adamve/fix/i158_propagate_exceptions branch January 21, 2025 11:07
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.

UsbYubiKeyDevice hangs without returning
2 participants