Opened 12 years ago
Closed 12 years ago
#5384 closed Bugs (fixed)
`diagnostic_information_what` returns 0 when no `error_info` is added to exception
| Reported by: | Owned by: | Emil Dotchevski | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | exception |
| Version: | Boost 1.46.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
Scenario:
- throwing derived exception from both
boost::exceptionandstd::exception - catching as
std::exception - logging with
e.what(), what is overridden and usesboost::diagnostic_information_what - when throwing such exception with
error_infoadded, everything is fine - when throwing such exception without
error_infoadded, no string is returned fromdiagnostic_information_what, at least I would expect the string like"Dynamic exception type: struct TestException"
Observations:
In diagnostic_information_what implementation is correct string generated by exception_detail::diagnostic_information_impl but is trashed and exception_detail::get_diagnostic_information returns 0 in described case.
Workaround:
We are using internal boost::exception_detail::diagnostic_information_impl instead of boost::diagnostic_information_what.
Note:
See TracTickets
for help on using tickets.

fixed, trunk revision 70988