{{ message }}
fix: re-raise existing exception when available#667
Merged
methane merged 2 commits intoApr 21, 2026
Merged
Conversation
Member
|
Would it be easy to add a test case for this issue? |
Sorry, something went wrong.
Contributor
Author
|
Ah yeah good point, let me have a look :) |
Sorry, something went wrong.
Contributor
Author
|
I added a test case, but I don't think it's possible to easily cover/simulate something that would happen like in #666. But the tests do flex the |
Sorry, something went wrong.
Hide details
View details
methane
merged commit
5d465bd
into
msgpack:main
Apr 21, 2026
26 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.
What is this PR?
This PR addresses an issue I found while working on #666 and reported in the description there.
Looking at the usages of
unpack_callback_uint32(here for example, which calls into this) it seems like it checks for error values -2 and -3, but -1 will justraise ValueError("Unpack failed: error = %d" % (ret,)).It believe it should just
raiseto raise the existing exception set byPyErr_SetStringif it exists. This PR addresses that problem here and another place.