Index: BOOST_THROW_EXCEPTION.html =================================================================== --- BOOST_THROW_EXCEPTION.html (revision 76706) +++ BOOST_THROW_EXCEPTION.html (working copy) @@ -25,15 +25,19 @@
#if !defined( BOOST_EXCEPTION_DISABLE ) #include <boost/exception/exception.hpp> #include <boost/current_function.hpp> + # ifndef BOOST_THROW_EXCEPTION_CURRENT_FUNCTION + # define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION + # endif #define BOOST_THROW_EXCEPTION(x)\ ::boost::throw_exception( ::boost::enable_error_info(x) <<\ - ::boost::throw_function(BOOST_CURRENT_FUNCTION) <<\ + ::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 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.
+This macro takes an exception object, records BOOST_THROW_EXCEPTION_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.
+BOOST_CURRENT_FUNCTION can produce very long names, that may lead to huge size of output files. Users may define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION before including boost/throw_exception.hpp to specify a different current function macro (for example a shorter but not portable __FUNCTION__ macro or to "(unknown)" value).