Guard diagnostic_information against null what()

This commit is contained in:
Christian Neumüller
2019-03-11 17:56:55 +01:00
committed by GitHub
parent b63736ac89
commit 90694bc3b9

View File

@ -161,7 +161,7 @@ boost
core::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_->name()) << '\n';
#endif
if( with_what && se && verbose )
tmp << "std::exception::what: " << wh << '\n';
tmp << "std::exception::what: " << (wh ? wh : "(null)") << '\n';
if( be )
if( char const * s=exception_detail::get_diagnostic_information(*be,tmp.str().c_str()) )
if( *s )