Skip to content

fix value_to for variants#999

Merged
grisumbras merged 1 commit intoboostorg:developfrom
grisumbras:fix/variant-exception-propagation
Apr 3, 2024
Merged

fix value_to for variants#999
grisumbras merged 1 commit intoboostorg:developfrom
grisumbras:fix/variant-exception-propagation

Conversation

@grisumbras
Copy link
Copy Markdown
Member

After we allowed exceptions to propagate through error_code-based conversions (when the user invoked value_to, rather than try_value_to), we inadvertently broke value_to for variants, because they relied on exceptions being caught by try_value_to. This change disables exception propagation for exactly one level of nesting.

After we allowed exceptions to propagate through error_code-based
conversions (when the user invoked value_to, rather than try_value_to),
we inadvertently broke value_to for variants, because they relied on
exceptions being caught by try_value_to. This change disables exception
propagation for exactly one level of nesting.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.08%. Comparing base (3a7ee79) to head (9f85ed6).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #999   +/-   ##
========================================
  Coverage    93.08%   93.08%           
========================================
  Files           87       87           
  Lines         8125     8125           
========================================
  Hits          7563     7563           
  Misses         562      562           
Files Coverage Δ
include/boost/json/detail/value_to.hpp 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a7ee79...9f85ed6. Read the comment docs.

@cppalliance-bot
Copy link
Copy Markdown

@grisumbras grisumbras merged commit 9f85ed6 into boostorg:develop Apr 3, 2024
@grisumbras grisumbras deleted the fix/variant-exception-propagation branch April 3, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants