decoupled boost/exception/exception.hpp from boost/exception/detail/type_info.hpp

diagnostic_information improvements
documentation update

[SVN r48469]
This commit is contained in:
Emil Dotchevski
2008-08-30 02:57:12 +00:00
parent e1aba12621
commit 9dd2d64304
15 changed files with 3062 additions and 2888 deletions

View File

@ -6,8 +6,8 @@
#ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593
#define UUID_FA5836A2CADA11DC8CD47C8555D89593
#include <boost/exception/detail/get_boost_exception.hpp>
#include <boost/exception/enable_current_exception.hpp>
#include <boost/exception/detail/type_info.hpp>
#include <boost/detail/atomic_count.hpp>
#include <stdexcept>
#include <new>
@ -257,6 +257,34 @@ boost
}
};
#ifdef BOOST_NO_RTTI
template <class T>
exception const *
get_boost_exception( T const * )
{
try
{
throw;
}
catch(
exception & x )
{
return &x;
}
catch(...)
{
return 0;
}
}
#else
template <class T>
exception const *
get_boost_exception( T const * x )
{
return dynamic_cast<exception const *>(x);
}
#endif
template <class T>
inline
exception_ptr
@ -340,6 +368,7 @@ boost
{
return exception_detail::current_exception_std_exception(e);
}
#ifndef BOOST_NO_TYPEID
catch(
std::bad_cast & e )
{
@ -350,6 +379,7 @@ boost
{
return exception_detail::current_exception_std_exception(e);
}
#endif
catch(
std::bad_exception & e )
{