Skip to content

Commit

Permalink
extract exception type name from std::exception_ptr on libstdc++
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin committed Jan 15, 2019
1 parent de6cef9 commit 386f550
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/boost/exception/diagnostic_information.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ boost
std::exception const * se=current_exception_cast<std::exception const>();
if( be || se )
return exception_detail::diagnostic_information_impl(be,se,true,verbose);
#if defined(__GLIBCXX__) && __cplusplus >= 201103L && !defined(BOOST_NO_RTTI)
else if (auto* p=std::current_exception().__cxa_exception_type())
return "Dynamic exception type: "+boost::core::demangle(p->name());
#endif
else
return "No diagnostic information available.";
}
Expand Down

0 comments on commit 386f550

Please sign in to comment.