From 167bdd0748d4657eb9d6296cbc320db63126dce7 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Mon, 6 Apr 2009 23:15:42 +0000 Subject: [PATCH] get_error_info returns raw pointer instead of shared_ptr (breaking change) diagnostic_information can now be called with boost::exception or std::exception object. BOOST_THROW_EXCEPTION can now be used even if exceptions are disabled. added functions: current_exception_diagnostic_information, current_exception_cast documentation updated to match. [SVN r52225] --- doc/BOOST_THROW_EXCEPTION.html | 7 +++++-- include/boost/throw_exception.hpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/BOOST_THROW_EXCEPTION.html b/doc/BOOST_THROW_EXCEPTION.html index d56d97e..bf355d7 100644 --- a/doc/BOOST_THROW_EXCEPTION.html +++ b/doc/BOOST_THROW_EXCEPTION.html @@ -22,7 +22,7 @@

BOOST_THROW_EXCEPTION

#include <boost/throw_exception.hpp>

-
#if !defined( BOOST_NO_EXCEPTIONS ) && !defined( BOOST_EXCEPTION_DISABLE )
+
#if !defined( BOOST_EXCEPTION_DISABLE )
     #include <boost/exception/exception.hpp>
     #include <boost/current_function.hpp>
     #define BOOST_THROW_EXCEPTION(x)\
@@ -34,10 +34,13 @@
     #define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
 #endif

This macro takes an exception object, records BOOST_CURRENT_FUNCTION, __FILE__ and __LINE__ in it, and forwards it to throw_exception. To recover this information at the catch site, use get_error_info; the information is also included in the message returned by diagnostic_information.

-
diff --git a/include/boost/throw_exception.hpp b/include/boost/throw_exception.hpp index 69cdad0..ed03335 100644 --- a/include/boost/throw_exception.hpp +++ b/include/boost/throw_exception.hpp @@ -32,7 +32,7 @@ # define BOOST_EXCEPTION_DISABLE #endif -#if !defined( BOOST_NO_EXCEPTIONS ) && !defined( BOOST_EXCEPTION_DISABLE ) +#if !defined( BOOST_EXCEPTION_DISABLE ) # include # include # define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(::boost::enable_error_info(x) <<\