diff --git a/doc/boost-exception.html b/doc/boost-exception.html index 2ae3f56..2002d35 100644 --- a/doc/boost-exception.html +++ b/doc/boost-exception.html @@ -25,10 +25,10 @@
The ability to add data to exception objects after they have been passed to throw is important, because often some of the information needed to handle an exception is unavailable in the context where the failure is detected.
Boost Exception also supports N2179-style copying of exception objects, implemented non-intrusively and automatically by the boost::throw_exception function.
virtual char const * diagnostic_information() const throw();
A string representation of all data stored in the boost::exception object by the operator<< function. See "Tutorial: Diagnostic Information" for details.
+A string representation of all data stored in the boost::exception object by the operator<< function. See "Diagnostic Information" for details.
Nothing.
virtual char const * diagnostic_information() const throw();
A string representation of all data stored in the boost::exception object by the operator<< function. See "Tutorial: Diagnostic Information" for details.
+A string representation of all data stored in the boost::exception object by the operator<< function. See "Diagnostic Information" for details.
Nothing.
virtual char const * diagnostic_information() const throw();
A string representation of all data stored in the boost::exception object by the operator<< function. See "Tutorial: Diagnostic Information" for details.
+A string representation of all data stored in the boost::exception object by the operator<< function. See "Diagnostic Information" for details.
Nothing.
boost/exception/diagnostic_information.hpp
@@ -37,6 +38,8 @@Integrating Boost Exception in Existing Exception Class Hierarchies
Tutorial: Diagnostic Information
-Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies
-Tutorial: Transporting of Arbitrary Data to the Catch Site
-Tutorial: Transporting of Exceptions Between Threads
+Transporting of Arbitrary Data to the Catch Site
+Transporting of Exceptions Between Threads
Class boost::exception provides a virtual member function diagnostic_information, with a signature similar to the familiar std::exception::what function. The default implementation returns a string value that is not presentable as a friendly user message, but because it is generated automatically, it is useful for debugging or logging purposes. Here is an example:
#include <boost/exception.hpp> diff --git a/doc/tutorial_enable_error_info.html b/doc/tutorial_enable_error_info.html index 8eaab4d..e0e8cd3 100644 --- a/doc/tutorial_enable_error_info.html +++ b/doc/tutorial_enable_error_info.html @@ -3,7 +3,7 @@ -tutorial: integrating boost exception in existing exception class hierarchies +integrating boost exception in existing exception class hierarchies @@ -19,7 +19,7 @@ -Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies
+Integrating Boost Exception in Existing Exception Class Hierarchies
Some exception hierarchies can not be modified to make boost::exception a base type. In this case, the enable_error_info function template can be used to make exception objects derive from boost::exception anyway. Here is an example:
#include <boost/exception.hpp> diff --git a/doc/tutorial_exception_ptr.html b/doc/tutorial_exception_ptr.html index 892b951..52c1a63 100644 --- a/doc/tutorial_exception_ptr.html +++ b/doc/tutorial_exception_ptr.html @@ -3,7 +3,7 @@ -tutorial: transporting of exceptions between threads +transporting of exceptions between threads @@ -19,12 +19,12 @@ -Tutorial: Transporting of Exceptions Between Threads
+Transporting of Exceptions Between Threads
Boost Exception supports transporting of exception objects between threads through cloning. This system is similar to N2179, but because Boost Exception can not rely on language support, the use of enable_current_exception at the time of the throw is required in order to use cloning.
Note:
All exceptions emitted by the familiar function boost::throw_exception are guaranteed to derive from boost::exception and to support cloning.
-Tutorial: Using enable_current_exception at the Time of the Throw
+Using enable_current_exception at the Time of the Throw
Here is how cloning can be enabled in a throw-expression (15.1):
#include <boost/exception/enable_current_exception.hpp> @@ -44,7 +44,7 @@ file_read( FILE * f, void * buffer, size_t size ) errno_info(errno); }
Of course, enable_current_exception may be used with any exception type; there is no requirement that it should derive from boost::exception.
-Tutorial: Cloning and Re-Throwing an Exception
+Cloning and Re-Throwing an Exception
When you catch an exception, you can call current_exception to get an exception_ptr object:
#include <boost/exception_ptr.hpp> diff --git a/doc/tutorial_transporting_data.html b/doc/tutorial_transporting_data.html index a8e5689..57fe771 100644 --- a/doc/tutorial_transporting_data.html +++ b/doc/tutorial_transporting_data.html @@ -3,7 +3,7 @@ -tutorial: transporting of arbitrary data to the catch site +transporting of arbitrary data to the catch site @@ -19,10 +19,10 @@ -Tutorial: Transporting of Arbitrary Data to the Catch Site
+Transporting of Arbitrary Data to the Catch Site
All exception types that derive from boost::exception can be used as type-safe containers of arbitrary data objects, while complying with the no-throw requirements (15.5.1) of the ANSI C++ standard for exception types. Data can be added to a boost::exception at the time of the throw, or at a later time.
-Tutorial: Adding of Arbitrary Data at the Point of the Throw
+Adding of Arbitrary Data at the Point of the Throw
The following example demonstrates how errno can be stored in exception objects using Boost Exception:
#include <boost/exception.hpp> @@ -60,7 +60,7 @@ g() } }
The get_error_info function template is instantiated with the typedef from (1), and is passed an exception object of a polymorphic type. If the exception object contains the requested value, the returned shared_ptr will point to it; otherwise an empty shared_ptr is returned.
-Tutorial: Adding of Arbitrary Data to Active Exception Objects
+Adding of Arbitrary Data to Active Exception Objects
Sometimes the throw site does not have all the information that is needed at the catch site to make sense of what went wrong. Here is an example:
#include <stdio.h> @@ -141,7 +141,7 @@ parse_file( char const * file_name ) }The above function is (almost) exception-neutral -- if an exception is emitted by any function call within the try block, parse_file does not need to do any real work, but it intercepts any boost::exception object, stores the file name, and re-throws using a throw-expression with no operand (15.1.6). The rationale for catching any boost::exception object is that the file name is relevant to any failure that occurs in parse_file, even if the failure is unrelated to file I/O.
As usual, the stored data can be retrieved using get_error_info.
-Tutorial: Adding Grouped Data to Exceptions
+Adding Grouped Data to Exceptions
The code snippet below demonstrates how boost::tuple can be used to bundle the name of the function that failed, together with the reported errno so that they can be added to exception objects more conveniently together:
#include <boost/exception/info_tuple.hpp> @@ -171,7 +171,7 @@ file_open( char const * name, char const * mode )