Source: https://stackoverflow.com/questions/15133259/boost-check-no-throw-how-to-get-exception-message-printed
When I test a method using
BOOST_CHECK_NO_THROW( method_to_test() );
and an exception is thrown, it displays that an exception was thrown, but never the exception's message like this:
test.cpp(14): error in "test": incorrect exception my_exception is caught
Is it possible to print the exception message as well, i.e. the string returned by my_exception.what()? my_exception is derived from std::exception and overloads what().