mirror of
https://github.com/boostorg/exception.git
synced 2025-07-21 16:32:05 +02:00
Added explicit handling for a few std exception types that were missing from boost::current_exception().
[SVN r52979]
This commit is contained in:
@ -15,6 +15,7 @@
|
|||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <ios>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
boost
|
boost
|
||||||
@ -236,11 +237,21 @@ boost
|
|||||||
return shared_ptr<exception_detail::clone_base const>(e.clone());
|
return shared_ptr<exception_detail::clone_base const>(e.clone());
|
||||||
}
|
}
|
||||||
catch(
|
catch(
|
||||||
|
std::domain_error & e )
|
||||||
|
{
|
||||||
|
return exception_detail::current_exception_std_exception(e);
|
||||||
|
}
|
||||||
|
catch(
|
||||||
std::invalid_argument & e )
|
std::invalid_argument & e )
|
||||||
{
|
{
|
||||||
return exception_detail::current_exception_std_exception(e);
|
return exception_detail::current_exception_std_exception(e);
|
||||||
}
|
}
|
||||||
catch(
|
catch(
|
||||||
|
std::length_error & e )
|
||||||
|
{
|
||||||
|
return exception_detail::current_exception_std_exception(e);
|
||||||
|
}
|
||||||
|
catch(
|
||||||
std::out_of_range & e )
|
std::out_of_range & e )
|
||||||
{
|
{
|
||||||
return exception_detail::current_exception_std_exception(e);
|
return exception_detail::current_exception_std_exception(e);
|
||||||
@ -251,6 +262,31 @@ boost
|
|||||||
return exception_detail::current_exception_std_exception(e);
|
return exception_detail::current_exception_std_exception(e);
|
||||||
}
|
}
|
||||||
catch(
|
catch(
|
||||||
|
std::range_error & e )
|
||||||
|
{
|
||||||
|
return exception_detail::current_exception_std_exception(e);
|
||||||
|
}
|
||||||
|
catch(
|
||||||
|
std::overflow_error & e )
|
||||||
|
{
|
||||||
|
return exception_detail::current_exception_std_exception(e);
|
||||||
|
}
|
||||||
|
catch(
|
||||||
|
std::underflow_error & e )
|
||||||
|
{
|
||||||
|
return exception_detail::current_exception_std_exception(e);
|
||||||
|
}
|
||||||
|
catch(
|
||||||
|
std::ios_base::failure & e )
|
||||||
|
{
|
||||||
|
return exception_detail::current_exception_std_exception(e);
|
||||||
|
}
|
||||||
|
catch(
|
||||||
|
std::runtime_error & e )
|
||||||
|
{
|
||||||
|
return exception_detail::current_exception_std_exception(e);
|
||||||
|
}
|
||||||
|
catch(
|
||||||
std::bad_alloc & e )
|
std::bad_alloc & e )
|
||||||
{
|
{
|
||||||
return exception_detail::current_exception_std_exception(e);
|
return exception_detail::current_exception_std_exception(e);
|
||||||
|
Reference in New Issue
Block a user