Skip to content

Fix empty exception values from bad ThrowFn declaration#33

Merged
ryanofsky merged 1 commit intobitcoin-core:masterfrom
ryanofsky:pr/except
Mar 22, 2020
Merged

Fix empty exception values from bad ThrowFn declaration#33
ryanofsky merged 1 commit intobitcoin-core:masterfrom
ryanofsky:pr/except

Conversation

@ryanofsky
Copy link
Copy Markdown
Collaborator

Also extend libmultiprocess unit test with coverage for this case.

Bad non-const ThrowFn declaration was causing ReadDestEmplace to try read
exception values after throwing them instead of before (in
update_fn(construct()) expression when construct() callback throws).

This was causing bitcoin functional tests to fail because JSONRPCError
exceptions caught were just null UniValue objects instead of objects with code
and message fields set.

Also extend libmultiprocess unit test with coverage for this case.

Bad non-const ThrowFn declaration was causing ReadDestEmplace to try read
exception values after throwing them instead of before (in
update_fn(construct()) expression when construct() callback throws).

This was causing bitcoin functional tests to fail because JSONRPCError
exceptions caught were just null UniValue objects instead of objects with code
and message fields set.
@ryanofsky ryanofsky merged commit 1d630f5 into bitcoin-core:master Mar 22, 2020
@bitcoin-core bitcoin-core locked and limited conversation to collaborators Jun 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant