Added explicit handling for a few std exception types that were missing from boost::current_exception().

[SVN r52979]
This commit is contained in:
Emil Dotchevski
2009-05-13 22:15:59 +00:00
parent 2c959a4e43
commit 0ddded8e41

View File

@ -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);