forked from boostorg/exception
Prefer using std::current_exception when available (refs #42)
This commit is contained in:
@ -385,6 +385,9 @@ boost
|
|||||||
{
|
{
|
||||||
return exception_ptr(shared_ptr<exception_detail::clone_base const>(e.clone()));
|
return exception_ptr(shared_ptr<exception_detail::clone_base const>(e.clone()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BOOST_NO_CXX11_HDR_EXCEPTION
|
||||||
|
|
||||||
catch(
|
catch(
|
||||||
std::domain_error & e )
|
std::domain_error & e )
|
||||||
{
|
{
|
||||||
@ -457,19 +460,19 @@ boost
|
|||||||
{
|
{
|
||||||
return exception_detail::current_exception_std_exception(e);
|
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(
|
catch(
|
||||||
std::exception & e )
|
std::exception & e )
|
||||||
{
|
{
|
||||||
return exception_detail::current_exception_unknown_std_exception(e);
|
return exception_detail::current_exception_unknown_std_exception(e);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
catch(
|
catch(
|
||||||
boost::exception & e )
|
boost::exception & e )
|
||||||
{
|
{
|
||||||
return exception_detail::current_exception_unknown_boost_exception(e);
|
return exception_detail::current_exception_unknown_boost_exception(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #ifdef BOOST_NO_CXX11_HDR_EXCEPTION
|
||||||
|
|
||||||
catch(
|
catch(
|
||||||
... )
|
... )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user