Feature request: predicate on CHECK_THROWS
Author: netheril96Created Mar 8, 2024Updated Jul 12, 2026
Labelshas-workaroundtype/feature-proposalcategory/API-usage
Description
The current assertion macros can only assert on either exception type or exception message. However, in my use case, I need to assert that it has a specific exception code.
Can we have
- Either an assertion macro that returns the captured exception
- Or an assertion macro accepting a lambda as a predicate to further distinguish an expected exception from an unexpected one
Source: doctest/doctest