diff --git a/include/boost/exception/diagnostic_information.hpp b/include/boost/exception/diagnostic_information.hpp index 99273bc..af10837 100644 --- a/include/boost/exception/diagnostic_information.hpp +++ b/include/boost/exception/diagnostic_information.hpp @@ -6,6 +6,7 @@ #ifndef UUID_0552D49838DD11DD90146B8956D89593 #define UUID_0552D49838DD11DD90146B8956D89593 +#include #include #include #include @@ -22,13 +23,17 @@ boost get_diagnostic_information( exception const & x ) { if( error_info_container * c=x.data_.get() ) +#ifndef BOOST_NO_EXCEPTIONS try { +#endif return c->diagnostic_information(); +#ifndef BOOST_NO_EXCEPTIONS } catch(...) { } +#endif return 0; } } diff --git a/include/boost/exception_ptr.hpp b/include/boost/exception_ptr.hpp index 196329d..5b574d6 100644 --- a/include/boost/exception_ptr.hpp +++ b/include/boost/exception_ptr.hpp @@ -6,6 +6,10 @@ #ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593 #define UUID_FA5836A2CADA11DC8CD47C8555D89593 +#include +#ifdef BOOST_NO_EXCEPTIONS +#error This header requires exception handling to be enabled. +#endif #include #include #include