mirror of
https://github.com/boostorg/exception.git
synced 2025-07-23 09:07:15 +02:00
added #error in headers incompatible with BOOST_NO_EXCEPTIONS
[SVN r50887]
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#ifndef UUID_0552D49838DD11DD90146B8956D89593
|
||||
#define UUID_0552D49838DD11DD90146B8956D89593
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/exception/get_error_info.hpp>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,10 @@
|
||||
#ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593
|
||||
#define UUID_FA5836A2CADA11DC8CD47C8555D89593
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_EXCEPTIONS
|
||||
#error This header requires exception handling to be enabled.
|
||||
#endif
|
||||
#include <boost/exception/exception.hpp>
|
||||
#include <boost/exception/detail/type_info.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
Reference in New Issue
Block a user