From 0ddded8e41e4a93bdb818d76a06ade1e0d0e3134 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Wed, 13 May 2009 22:15:59 +0000 Subject: [PATCH] Added explicit handling for a few std exception types that were missing from boost::current_exception(). [SVN r52979] --- include/boost/exception_ptr.hpp | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/include/boost/exception_ptr.hpp b/include/boost/exception_ptr.hpp index 2499d8a..5fccb6f 100644 --- a/include/boost/exception_ptr.hpp +++ b/include/boost/exception_ptr.hpp @@ -15,6 +15,7 @@ #include #include #include +#include namespace boost @@ -236,11 +237,21 @@ boost return shared_ptr(e.clone()); } catch( + std::domain_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( std::invalid_argument & e ) { return exception_detail::current_exception_std_exception(e); } catch( + std::length_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( std::out_of_range & e ) { return exception_detail::current_exception_std_exception(e); @@ -251,6 +262,31 @@ boost return exception_detail::current_exception_std_exception(e); } 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 ) { return exception_detail::current_exception_std_exception(e);