Merge pull request #43 from boostorg/pr/current-exception

Prefer using std::current_exception when available
This commit is contained in:
Emil Dotchevski
2022-01-25 19:40:04 -08:00
committed by GitHub
3 changed files with 121 additions and 3 deletions

View File

@ -395,6 +395,9 @@ boost
{
return exception_ptr(shared_ptr<exception_detail::clone_base const>(e.clone()));
}
#ifdef BOOST_NO_CXX11_HDR_EXCEPTION
catch(
std::domain_error & e )
{
@ -467,19 +470,19 @@ boost
{
return exception_detail::current_exception_std_exception(e);
}
#ifdef BOOST_NO_CXX11_HDR_EXCEPTION
// this case can be handled losslesly with std::current_exception() (see below)
catch(
std::exception & e )
{
return exception_detail::current_exception_unknown_std_exception(e);
}
#endif
catch(
boost::exception & e )
{
return exception_detail::current_exception_unknown_boost_exception(e);
}
#endif // #ifdef BOOST_NO_CXX11_HDR_EXCEPTION
catch(
... )
{