From 0449861f375dc8888e4aafb84bd2e2172ac87348 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Tue, 2 Sep 2008 23:20:49 +0000 Subject: [PATCH] documentation update [SVN r48554] --- doc/BOOST_THROW_EXCEPTION.html | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 doc/BOOST_THROW_EXCEPTION.html diff --git a/doc/BOOST_THROW_EXCEPTION.html b/doc/BOOST_THROW_EXCEPTION.html new file mode 100644 index 0000000..d96f297 --- /dev/null +++ b/doc/BOOST_THROW_EXCEPTION.html @@ -0,0 +1,57 @@ + + + + + BOOST_THROW_EXCEPTION + + + +
+
+
+
+ +

Boost Exception

+
+ + + +

BOOST_THROW_EXCEPTION

+
+

#include <boost/throw_exception.hpp>

+
#if !defined( BOOST_NO_EXCEPTIONS ) && !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_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 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.

+
+ + + + +
+
+
+ +