From 21f522e4b67c7617934fbb1816b10dca7b6faaef Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Tue, 16 Feb 2021 22:56:32 -0800 Subject: [PATCH] Pointing throw_exception documentation to Boost.ThrowException. --- doc/BOOST_THROW_EXCEPTION.html | 14 +------------- doc/configuration_macros.html | 11 +++++------ doc/throw_exception.html | 23 +---------------------- 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/doc/BOOST_THROW_EXCEPTION.html b/doc/BOOST_THROW_EXCEPTION.html index 7d8806f..2697aaf 100644 --- a/doc/BOOST_THROW_EXCEPTION.html +++ b/doc/BOOST_THROW_EXCEPTION.html @@ -21,19 +21,7 @@

BOOST_THROW_EXCEPTION

-

#include <boost/throw_exception.hpp>

-
#if !defined( BOOST_EXCEPTION_DISABLE )
-    #include <boost/exception/exception.hpp>
-    #include <boost/current_function.hpp>
-    #define BOOST_THROW_EXCEPTION(x)\
-        ::boost::throw_exception( ::boost::enable_error_info(x) <<\
-        ::boost::throw_function(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION) <<\
-        ::boost::throw_file(__FILE__) <<\
-        ::boost::throw_line((int)__LINE__) )
-#else
-    #define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
-#endif
-

This macro takes an exception object, records the current function name, __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.

+

Please see Boost.ThrowException.


See also: Boost Exception | boost/throw_exception.hpp | Configuration Macros | Frequently Asked Questions
diff --git a/doc/configuration_macros.html b/doc/configuration_macros.html index b19ff9f..587230c 100644 --- a/doc/configuration_macros.html +++ b/doc/configuration_macros.html @@ -22,18 +22,17 @@

Configuration Macros

Boost Exception responds to the following configuration macros:

-

BOOST_NO_RTTI 
BOOST_NO_TYPEID

+

BOOST_NO_RTTI 
BOOST_NO_TYPEID (both defined automatically by boost/config.hpp)

The first macro prevents Boost Exception from using dynamic_cast and dynamic typeid. If the second macro is also defined, Boost Exception does not use static typeid either. There are no observable degrading effects on the library functionality, except for the following:

By default, the get_error_info function template can be called with any exception type. If BOOST_NO_RTTI is defined, get_error_info can be used only with objects of type boost::exception.

Note:

The library needs RTTI functionality. Disabling the language RTTI support enables an internal RTTI system, which may have more or less overhead depending on the platform.

-

BOOST_EXCEPTION_DISABLE

-

By default, enable_current_exception and enable_error_info are integrated directly in the throw_exception function. Defining BOOST_EXCEPTION_DISABLE disables this integration.

Note that on some non-conformant compilers, for example MSVC 7.0 and older, as well as BCC, BOOST_EXCEPTION_DISABLE is implicitly defined in boost/throw_exception.hpp.

-

BOOST_NO_EXCEPTIONS

+

BOOST_NO_EXCEPTIONS (defined automatically by boost/config.hpp)

This macro disables exception handling in Boost, forwarding all exceptions to a user-defined non-template version of boost::throw_exception. However, unless BOOST_EXCEPTION_DISABLE is also defined, users can still examine the exception object for any data added at the point of the throw, or use boost::diagnostic_information (of course under BOOST_NO_EXCEPTIONS, the user-defined boost::throw_exception is not allowed to return to the caller.)

-

BOOST_THROW_EXCEPTION_CURRENT_FUNCTION

-

The BOOST_THROW_EXCEPTION macro uses BOOST_THROW_EXCEPTION_CURRENT_FUNCTION to record the name of the current function in the exception object. Unless overridden by the user, BOOST_THROW_EXCEPTION_CURRENT_FUNCTION expands to BOOST_CURRENT_FUNCTION.

+

In addition, the following user-defined macros are recognized:

+

BOOST_EXCEPTION_DISABLE (user-defined)

+

By default, enable_current_exception and enable_error_info are integrated directly in the throw_exception function. Defining BOOST_EXCEPTION_DISABLE disables this integration.


See also: BOOST_THROW_EXCEPTION | Boost Exception | boost/exception/all.hpp | Frequently Asked Questions | get_error_info
diff --git a/doc/throw_exception.html b/doc/throw_exception.html index eb03fdb..d6dd9be 100644 --- a/doc/throw_exception.html +++ b/doc/throw_exception.html @@ -21,28 +21,7 @@

throw_exception

-

#include <boost/throw_exception.hpp>

-
namespace
-boost
-    {
-#ifdef BOOST_NO_EXCEPTIONS
-    void throw_exception( std::exception const & e ); // user defined
-#else
-    template <class E>
-    void throw_exception( E const & e );
-#endif
-    }
-

Effects:

-
  • If BOOST_NO_EXCEPTIONS is not defined, boost::throw_exception(e) throws an exception of unspecified type that derives publicly from E and from boost::exception.
  • -
  • If BOOST_NO_EXCEPTIONS is defined, the function is left undefined, and the user is expected to supply an appropriate definition. Callers of throw_exception are allowed to assume that the function never returns; therefore, if the user-defined throw_exception returns, the behavior is undefined.
  • -
-

Requirements:

-

E must derive publicly from std::exception. E may or may not derive from boost::exception.

-

Notes:

-
  • The emitted exception can be intercepted as E &, std::exception &, or boost::exception &.
  • -
  • The emitted exception supports boost::exception_ptr.
  • -
  • If BOOST_EXCEPTION_DISABLE is defined and BOOST_NO_EXCEPTIONS is not defined, boost::throw_exception(e) equivalent to throw e.
  • -
+

Please see Boost.ThrowException.


See also: BOOST_THROW_EXCEPTION | Boost Exception | boost/throw_exception.hpp | Configuration Macros | enable_current_exception | Frequently Asked Questions | Transporting of Exceptions Between Threads