Opened 12 years ago

Closed 11 years ago

Last modified 7 years ago

#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 Vicente Botet <vicente.botet@…>, 12 years ago

Component: Nonetest
Owner: set to Gennadiy Rozental

comment:2 by Gennadiy Rozental, 11 years ago

Resolution: fixed
Status: newclosed

(In [75004]) use typeid to report "real" exception type if possible. Fixes #4911

comment:3 by Raffi Enficiaud, 7 years ago

Milestone: To Be DeterminedBoost 1.59.0
Note: See TracTickets for help on using tickets.