the way (nested) exceptions are printed
- Dominant language
- C++
- Stars
- 39.5k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
Hi there,
`HandleExceptionsInMethodIfSupported` only prints the last thrown exception `e.what()` (formatted in `FormatCxxExceptionMessage`).
If the exception was nested (*i.e.* thrown with `std::throw_with_nested`) it would be great to unwrap and print all nested exceptions to get a useful message (using `std::rethrow_if_nested` like presented in https://en.cppreference.com/w/cpp/error/throw_with_nested).
Otherwise it would be great to be able to override `HandleExceptionsInMethodIfSupported` :D
Contributor guide
Research direction
Locate HandleExceptionsInMethodIfSupported and FormatCxxExceptionMessage, then read how exceptions are currently caught and formatted. Compare the behavior with std::throw_with_nested and std::rethrow_if_nested as described in the linked reference. Done means nested exception details are reported, or the handler can be overridden if that alternative is selected, with corresponding tests for the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100