#4911 closed Feature Requests (fixed)
ENH: boost.test output the exception real type name.
Reported by: | anonymous | Owned by: | Gennadiy Rozental |
---|---|---|---|
Milestone: | Boost 1.59.0 | Component: | test |
Version: | Boost 1.45.0 | Severity: | Optimization |
Keywords: | Cc: |
Description
boost\test\impl\execution_monitor.ipp int execution_monitor::execute( unit_test::callback0<int> const& F ) we loss the real type of the exception, why not output it like this: "std::bad_exception: %s: %s", typeid(ex).name(), ex.what()
try {
return catch_signals( F );
} catch( std::bad_exception const& ex )
{ detail::report_error( execution_exception::cpp_exception_error,
current_exception_cast<boost::exception const>(), "std::bad_exception: %s: %s",
typeid(ex).name(), ex.what() ); output typeid(ex).name(). }
catch( std::domain_error const& ex )
{ detail::report_error( execution_exception::cpp_exception_error,
current_exception_cast<boost::exception const>(),
"std::domain_error: %s", ex.what() ); current version 1.45, wo lost the type info.
}
.......
Change History (3)
comment:1 by , 12 years ago
Component: | None → test |
---|---|
Owner: | set to |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 7 years ago
Milestone: | To Be Determined → Boost 1.59.0 |
---|
(In [75004]) use typeid to report "real" exception type if possible. Fixes #4911