mirror of
https://github.com/boostorg/throw_exception.git
synced 2025-07-17 14:22:16 +02:00
Integration of Boost Exception in boost::throw_exception().
[SVN r44954]
This commit is contained in:
committed by
Peter Dimov
parent
c0b722d62c
commit
7ad5ceee77
@ -23,6 +23,11 @@
|
|||||||
|
|
||||||
#ifdef BOOST_NO_EXCEPTIONS
|
#ifdef BOOST_NO_EXCEPTIONS
|
||||||
# include <exception>
|
# include <exception>
|
||||||
|
#else
|
||||||
|
# ifndef BOOST_EXCEPTION_DISABLE
|
||||||
|
# include <boost/exception/enable_current_exception.hpp>
|
||||||
|
# include <boost/exception/enable_error_info.hpp>
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
@ -36,7 +41,11 @@ void throw_exception(std::exception const & e); // user defined
|
|||||||
|
|
||||||
template<class E> inline void throw_exception(E const & e)
|
template<class E> inline void throw_exception(E const & e)
|
||||||
{
|
{
|
||||||
|
#ifndef BOOST_EXCEPTION_DISABLE
|
||||||
|
throw enable_current_exception(enable_error_info(e));
|
||||||
|
#else
|
||||||
throw e;
|
throw e;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user