forked from boostorg/exception
Merge pull request #18 from apolukhin/antoshkka/exception-type-from-ptr
Extract exception type name from std::exception_ptr on libstdc++
This commit is contained in:
@ -45,6 +45,10 @@ boost
|
|||||||
std::exception const * se=current_exception_cast<std::exception const>();
|
std::exception const * se=current_exception_cast<std::exception const>();
|
||||||
if( be || se )
|
if( be || se )
|
||||||
return exception_detail::diagnostic_information_impl(be,se,true,verbose);
|
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
|
else
|
||||||
return "No diagnostic information available.";
|
return "No diagnostic information available.";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user