diff --git a/doc/boost_exception_current_exception_cast_hpp.html b/doc/boost_exception_current_exception_cast_hpp.html index 115f3af..54be7de 100644 --- a/doc/boost_exception_current_exception_cast_hpp.html +++ b/doc/boost_exception_current_exception_cast_hpp.html @@ -30,7 +30,8 @@ boost }
namespace +#include <boost/exception/current_exception_cast.hpp>
+namespace boost { template <class E> diff --git a/doc/source/boost-exception.reno b/doc/source/boost-exception.reno index 64f4544..28ea1e8 100644 --- a/doc/source/boost-exception.reno +++ b/doc/source/boost-exception.reno @@ -48,6 +48,59 @@
+ + + + reno_context + + +1 +2 +(:include include:) (:auto also:) ++ ++ 0 ++ 6 ++ reno_context ++ -+ 0 ++ 8 @@ -138,93 +234,6 @@ reno_context (:include include:) (:auto also:) - -- -0 -- -7 -- -reno_context -- -- -- -- -- -2 - F7633FDCF6615C0199645701EE6E7ACE5CBCD7A7CF6838573791E91ABB3C09F2 -1668435395 -1332 -396 - A1F443AF571973A12005D2F7D4AE09A32AAF686FEEAE272EC21512A65EB943E8 -3879093659 -1300 -26 -- -- -0 -../../../../boost/exception/info_tuple.hpp -0 -0 - - -tuple/operator<< -- -- - -1 -2 -(:include include:) (:auto also:) -- - -0 -- -8 -- -reno_context -- -- -- -- -- -0 -- -- -1 -- -transporting of arbitrary data to the catch site -- -tutorial_transporting_data -- -1 -2 -(:include include:) (:auto also:) -- - 0 @@ -233,100 +242,6 @@- reno_context - - -- -- -- -- -1 - 55F1164770FD778354E151EF65A3E830DA20F325F7ED20A95130A4B83FC801BF -1282550303 -9192 -323 -- -- -0 -../../../../boost/exception/exception.hpp -0 -0 - - -boost/exception/exception.hpp -- -exception_exception_hpp -- -1 -2 -(:include include:) (:auto also:) -- -- -0 -- -10 -- -reno_context -- -- -- -- -- -2 - 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44 -2533933282 -8724 -615 - 0066D4E6E6B189906E6DE04F08509F3737511701A1B1355B37511EC18E8371F4 -2078296250 -305 -8156 -- -- -0 -../../../../boost/exception_ptr.hpp -0 -0 - - -copy_exception -- -- - -1 -2 -(:include include:) (:auto also:) -- +- 0 -- 11 -- reno_context -@@ -368,6 +283,93 @@ (:include include:) (:auto also:) + ++ +0 ++ +10 ++ +reno_context ++ ++ ++ ++ ++ +2 + F7633FDCF6615C0199645701EE6E7ACE5CBCD7A7CF6838573791E91ABB3C09F2 +1668435395 +1332 +396 + A1F443AF571973A12005D2F7D4AE09A32AAF686FEEAE272EC21512A65EB943E8 +3879093659 +1300 +26 ++ ++ +0 +../../../../boost/exception/info_tuple.hpp +0 +0 + + +tuple/operator<< ++ ++ + +1 +2 +(:include include:) (:auto also:) ++ + +0 ++ +11 ++ +reno_context ++ ++ ++ ++ ++ +0 ++ ++ +1 ++ +transporting of arbitrary data to the catch site ++ +tutorial_transporting_data ++ +1 +2 +(:include include:) (:auto also:) ++ + 0 @@ -376,6 +378,100 @@+ reno_context + + ++ ++ ++ ++ +1 + 55F1164770FD778354E151EF65A3E830DA20F325F7ED20A95130A4B83FC801BF +1282550303 +9192 +323 ++ ++ +0 +../../../../boost/exception/exception.hpp +0 +0 + + +boost/exception/exception.hpp ++ +exception_exception_hpp ++ +1 +2 +(:include include:) (:auto also:) ++ ++ +0 ++ +13 ++ +reno_context ++ ++ ++ ++ ++ +2 + 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44 +2533933282 +8724 +615 + 0066D4E6E6B189906E6DE04F08509F3737511701A1B1355B37511EC18E8371F4 +2078296250 +305 +8156 ++ ++ +0 +../../../../boost/exception_ptr.hpp +0 +0 + + +copy_exception ++ ++ + +1 +2 +(:include include:) (:auto also:) ++ ++ 0 ++ 14 ++ reno_context +@@ -417,7 +513,7 @@ 0 - 13 +15 @@ -462,7 +558,7 @@ reno_context 0 - 14 +16 @@ -500,7 +596,7 @@ reno_context 0 - 15 +17 @@ -549,7 +645,7 @@ reno_context 0 - 16 +18 @@ -585,7 +681,7 @@ reno_context 0 - 17 +19 @@ -619,7 +715,7 @@ reno_context 0 - 18 +20 @@ -660,7 +756,7 @@ reno_context 0 - -14 +-16 2 @@ -671,7 +767,7 @@0 - -17 +-19 @@ -684,7 +780,7 @@ 0 - -18 +-20 @@ -697,7 +793,7 @@ 0 - 19 +21 @@ -746,7 +842,7 @@ reno_context 0 - 20 +22 @@ -795,7 +891,56 @@ reno_context + 0 - +21 +23 ++ +reno_context ++ ++ ++ ++ ++ +2 + 55F1164770FD778354E151EF65A3E830DA20F325F7ED20A95130A4B83FC801BF +1282550303 +9192 +323 + 17E691632123EB67BA67D590B49EB8094F462F5A10A66A1C5438E1867EF1478E +765399792 +77 +5917 ++ ++ +0 +../../../../boost/exception/exception.hpp +0 +0 + + +exception::~exception ++ +exception_destructor ++ +1 +2 +(:include include:) (:auto also:) ++ -+ 0 ++ 24 @@ -838,103 +983,7 @@ reno_context - 0 - -22 -- -reno_context -- -- -- -- -- -1 - FC684D0DD5A9732B4130F2AB3DB6E0491D0F523E14B7FB738B2019EA2C7F8717 -2229778754 -631 -319 -- -- -0 -../../example/cloning_2.cpp -0 -0 - - -cloning and re-throwing an exception -- -cloning_and_rethrowing -- -0 -- -- -0 -- -23 -- -reno_context -- -- -- -- -- -3 - 612485E090D76B2CC43C1A296F813075BA165C2496082E78E939F10B3DA8E09A -1770110914 -587 -1462 - 60F3F48B87487FA6E0D2CCC0750AF435CC92CEC80BBBF609AC71295031AADD0D -3929437933 -361 -213 - CD1241D84950468704F3C3F04116B8DA5162A8BEA4364F10951232F49113C5DE -1658463867 -121 -238 -- -- -0 -../../../../boost/throw_exception.hpp -0 -0 - - -configuration macros -- -- - -1 -2 -(:include include:) (:auto also:) -- -- 0 -- 24 +25 @@ -983,7 +1032,7 @@ reno_context 0 - 25 +26 @@ -1024,55 +1073,6 @@ reno_context (:include include:) (:auto also:) - - -0 -- -26 -- -reno_context -- -- -- -- -- -2 - 55F1164770FD778354E151EF65A3E830DA20F325F7ED20A95130A4B83FC801BF -1282550303 -9192 -323 - 17E691632123EB67BA67D590B49EB8094F462F5A10A66A1C5438E1867EF1478E -765399792 -77 -5917 -- -- -0 -../../../../boost/exception/exception.hpp -0 -0 - - -exception::~exception -- -exception_destructor -- -1 -2 -(:include include:) (:auto also:) -+ + 0 @@ -1168,6 +1168,49 @@+ reno_context + + ++ ++ ++ ++ +1 + F4C951B28F7DE500973AA3DFAA99F2BADA6EDAFA2B406C30BEF3B7FBE6FD57D7 +2263754923 +982 +306 ++ ++ +0 +../../example/error_info_2.cpp +0 +0 + + +adding of arbitrary data to active exception objects ++ +adding_data_later ++ +0 ++ + 0 ++ 30 ++ reno_context +@@ -1213,7 +1256,7 @@ 0 - 30 +31 @@ -1266,7 +1309,7 @@ reno_context 0 - 31 +32 @@ -1311,7 +1354,7 @@ reno_context 0 - 32 +33 @@ -1354,7 +1397,7 @@ reno_context 0 - 33 +34 @@ -1363,41 +1406,36 @@ reno_context - 1 - F4C951B28F7DE500973AA3DFAA99F2BADA6EDAFA2B406C30BEF3B7FBE6FD57D7 -2263754923 -982 -306 +0 - 0 -../../example/error_info_2.cpp -0 -0 + 1 - adding of arbitrary data to active exception objects +Synopsis - adding_data_later +synopsis - 0 +1 +2 +(:include include:) (:auto also:) - 0 - 34 +35 @@ -1446,7 +1484,7 @@ reno_context 0 - 35 +36 @@ -1495,7 +1533,7 @@ reno_context 0 - 36 +37 @@ -1533,7 +1571,7 @@ reno_context 0 - 37 +38 @@ -1571,7 +1609,7 @@ reno_context 0 - 38 +39 @@ -1620,7 +1658,7 @@ reno_context 0 - 39 +40 @@ -1669,7 +1707,7 @@ reno_context 0 - 40 +41 @@ -1707,7 +1745,7 @@ reno_context 0 - 41 +42 @@ -1756,7 +1794,7 @@ reno_context 0 - 42 +43 @@ -1805,7 +1843,7 @@ reno_context 0 - 43 +44 @@ -1858,7 +1896,7 @@ reno_context 0 - 44 +45 @@ -1901,7 +1939,7 @@ reno_context 0 - 45 +46 @@ -1939,7 +1977,7 @@ reno_context 0 - 46 +47 @@ -1978,44 +2016,6 @@ reno_context 0 - - -0 -- -47 -- -reno_context -- -- -- -- -- -0 -- -- -1 -- -Synopsis -- -synopsis -- -1 -2 -(:include include:) (:auto also:) -0 @@ -2996,36 +2996,7 @@- 7 -2 -[@class (:link -1 -- -0 -- --41 -2 -:) { protected: (:include -1 -- -0 -- --43 -2 -decl pre_indent="4":) (:include -1 -- -0 -- --26 -2 -decl pre_indent="4":) };@] +0 @@ -3035,6 +3006,46 @@ +-42 ++ +7 +2 +[@class (:link +1 ++ +0 ++ +-42 +2 +:) { protected: (:include +1 ++ +0 ++ +-44 +2 +decl pre_indent="4":) (:include +1 ++ +0 ++ +-23 +2 +decl pre_indent="4":) };@] ++ -+ 0 ++ +-43 +9 2 @@ -3043,7 +3054,7 @@0 - -42 +-43 2 @@ -3061,7 +3072,7 @@0 - -11 +-9 2 @@ -3070,24 +3081,13 @@0 - -30 +-31 2 decl pre_indent="4":) };@] - - -0 -- --43 -- -0 -0 @@ -3341,54 +3341,7 @@- 11 -2 -[@(:include -1 -- -0 -- --41 -2 -def:) (:include -1 -- -0 -- --42 -2 -decl:) typedef (:link -1 -- -0 -- --42 -2 -:)<struct tag_throw_function,char const *> throw_function; typedef (:link -1 -- -0 -- --42 -2 -:)<struct tag_throw_file,char const *> throw_file; typedef (:link -1 -- -0 -- --42 -2 -:)<struct tag_throw_line,int> throw_line;@] +0 @@ -3421,7 +3374,54 @@ - 0 +11 +2 +[@(:include +1 ++ +0 ++ +-42 +2 +def:) (:include +1 ++ +0 ++ +-43 +2 +decl:) typedef (:link +1 ++ +0 ++ +-43 +2 +:)<struct tag_throw_function,char const *> throw_function; typedef (:link +1 ++ +0 ++ +-43 +2 +:)<struct tag_throw_file,char const *> throw_file; typedef (:link +1 ++ +0 ++ +-43 +2 +:)<struct tag_throw_line,int> throw_line;@] @@ -3432,18 +3432,7 @@ - 3 -2 -[@(:include -1 -- -0 -- --35 -2 -decl:)@] +0 @@ -3465,7 +3454,18 @@ - 0 +3 +2 +[@(:include +1 ++ +0 ++ +-36 +2 +decl:)@] @@ -3604,7 +3604,7 @@ +0 - -24 +-25 2 @@ -3651,6 +3651,17 @@-31 ++ +0 ++ -+ 0 ++ +-32 +5 2 @@ -3659,7 +3670,7 @@0 - -5 +-6 2 @@ -3675,17 +3686,6 @@decl:)@] - - -0 -- --32 -- -0 -0 @@ -3877,7 +3877,7 @@0 - -7 +-10 2 @@ -3899,7 +3899,7 @@0 - -31 +-32 2 @@ -3917,7 +3917,7 @@0 - -9 +-12 2 @@ -3926,7 +3926,7 @@0 - -13 +-15 2 @@ -3986,7 +3986,7 @@0 - -19 +-21 2 @@ -4019,7 +4019,7 @@0 - -42 +-43 2 @@ -4052,7 +4052,7 @@0 - -42 +-43 2 @@ -4061,7 +4061,7 @@0 - -15 +-17 2 @@ -4083,7 +4083,7 @@0 - -34 +-35 2 @@ -4092,7 +4092,7 @@0 - -20 +-22 2 @@ -4101,7 +4101,7 @@0 - -10 +-13 2 @@ -4110,7 +4110,7 @@0 - -6 +-8 2 @@ -4119,7 +4119,7 @@0 - -39 +-40 2 @@ -4141,7 +4141,7 @@0 - -25 +-26 2 @@ -4150,7 +4150,7 @@0 - -38 +-39 2 @@ -4183,7 +4183,7 @@0 - -29 +-30 2 @@ -4212,18 +4212,7 @@- 3 -2 -[@template <class E> std::string (:link -1 -- -0 -- --5 -2 -:)( E const & e );@] +0 @@ -4234,18 +4223,9 @@ - 5 +3 2 -[@(:link -1 -- -0 -- --20 -2 -:) (:link +[@template <class E> std::string (:link 1 0 @@ -4254,7 +4234,7 @@2 -:)();@] +:)( E const & e );@] @@ -4265,36 +4245,7 @@ - 7 -2 -[@template <class E, class Tag1, class T1, ..., class TagN, class TN> E const & (:link -1 -- -0 -- --7 -2 -mod="/":)( E const & x, (:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)< (:link -1 -- -0 -- --42 -2 -:)<Tag1,T1>, ..., (:link -1 -- -0 -- --42 -2 -:)<TagN,TN> > const & v );@] +0 @@ -4305,7 +4256,27 @@ - 0 +5 +2 +[@(:link +1 ++ +0 ++ +-22 +2 +:) (:link +1 ++ +0 ++ +-8 +2 +:)();@] @@ -4315,48 +4286,6 @@ --9 -- -0 -- -- -0 -- --10 -- -5 -2 -[@template <class T> (:link -1 -- -0 -- --20 -2 -:) (:link -1 -- -0 -- --10 -2 -:)( T const & e );@] -- +- 0 -- --11 -5 2 @@ -4365,7 +4294,7 @@0 - -11 +-9 2 @@ -4381,6 +4310,57 @@mod="m":) const & v );@] + ++ +0 ++ +-10 ++ +7 +2 +[@template <class E, class Tag1, class T1, ..., class TagN, class TN> E const & (:link +1 ++ +0 ++ +-10 +2 +mod="/":)( E const & x, (:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)< (:link +1 ++ +0 ++ +-43 +2 +:)<Tag1,T1>, ..., (:link +1 ++ +0 ++ +-43 +2 +:)<TagN,TN> > const & v );@] ++ + +0 ++ +-11 ++ +0 +0 @@ -4400,7 +4380,27 @@- 0 +5 +2 +[@template <class T> (:link +1 ++ +0 ++ +-22 +2 +:) (:link +1 ++ +0 ++ +-13 +2 +:)( T const & e );@] @@ -4422,27 +4422,7 @@ - 5 -2 -[@template <class E, class Tag, class T> E const & (:link -1 -- -0 -- --15 -2 -mod="/":)( E const & x, (:link -1 -- -0 -- --42 -2 -:)<Tag,T> const & v );@] +0 @@ -4464,7 +4444,27 @@ - 0 +5 +2 +[@template <class E, class Tag, class T> E const & (:link +1 ++ +0 ++ +-17 +2 +mod="/":)( E const & x, (:link +1 ++ +0 ++ +-43 +2 +:)<Tag,T> const & v );@] @@ -4486,18 +4486,7 @@ - 3 -2 -[@template <class T> ---unspecified--- (:link -1 -- -0 -- --19 -2 -:)( T const & x );@] +0 @@ -4508,18 +4497,7 @@ - 3 -2 -[@typedef ---unspecified--- (:link -1 -- -0 -- --20 -2 -:);@] +0 @@ -4530,7 +4508,18 @@ - 0 +3 +2 +[@template <class T> ---unspecified--- (:link +1 ++ +0 ++ +-21 +2 +:)( T const & x );@] @@ -4541,7 +4530,18 @@ - 0 +3 +2 +[@typedef ---unspecified--- (:link +1 ++ +0 ++ +-22 +2 +:);@] @@ -4552,7 +4552,18 @@ - 0 +3 +2 +[@(:link +1 ++ +0 ++ +-23 +2 +mod="m":)();@] @@ -4563,18 +4574,7 @@ - 3 -2 -[@template <class T> ---unspecified--- (:link -1 -- -0 -- --24 -2 -:)( T const & e );@] +0 @@ -4585,18 +4585,9 @@ - 19 +3 2 -[@#if !defined( BOOST_EXCEPTION_DISABLE ) #include <(:link -1 -- -0 -- --9 -2 -:)> #include <boost/current_function.hpp> #define (:link +[@template <class T> ---unspecified--- (:link 1 0 @@ -4605,70 +4596,7 @@2 -:)(x)\ ::boost::(:link -1 -- -0 -- --38 -2 -:)( ::boost::(:link -1 -- -0 -- --19 -2 -:)(x) <<\ ::boost::(:link -1 -- -0 -- --9 -2 -|throw_function:)(BOOST_CURRENT_FUNCTION) <<\ ::boost::(:link -1 -- -0 -- --9 -2 -|throw_file:)(__FILE__) <<\ ::boost::(:link -1 -- -0 -- --9 -2 -|throw_line:)((int)__LINE__) ) #else #define (:link -1 -- -0 -- --25 -2 -:)(x) ::boost::(:link -1 -- -0 -- --38 -2 -:)(x) #endif@] +:)( T const & e );@] @@ -4679,9 +4607,18 @@ - 3 +19 2 -[@(:link +[@#if !defined( BOOST_EXCEPTION_DISABLE ) #include <(:link +1 ++ +0 ++ +-12 +2 +:)> #include <boost/current_function.hpp> #define (:link 1 0 @@ -4690,7 +4627,70 @@2 -mod="m":)();@] +:)(x)\ ::boost::(:link +1 ++ +0 ++ +-39 +2 +:)( ::boost::(:link +1 ++ +0 ++ +-21 +2 +:)(x) <<\ ::boost::(:link +1 ++ +0 ++ +-12 +2 +|throw_function:)(BOOST_CURRENT_FUNCTION) <<\ ::boost::(:link +1 ++ +0 ++ +-12 +2 +|throw_file:)(__FILE__) <<\ ::boost::(:link +1 ++ +0 ++ +-12 +2 +|throw_line:)((int)__LINE__) ) #else #define (:link +1 ++ +0 ++ +-26 +2 +:)(x) ::boost::(:link +1 ++ +0 ++ +-39 +2 +:)(x) #endif@] @@ -4733,6 +4733,17 @@ +-29 ++ +0 ++ -+ 0 ++ +-30 +3 2 @@ -4741,7 +4752,7 @@0 - -29 +-30 2 @@ -4752,7 +4763,7 @@0 - -30 +-31 @@ -4772,24 +4783,13 @@ 0 - -30 +-31 2 mod="m":)() const;@] - - -0 -- --31 -- -0 -+ + 0 @@ -4819,6 +4819,17 @@-34 + +0 ++ -+ 0 ++ +-35 +5 2 @@ -4827,7 +4838,7 @@0 - -34 +-35 2 @@ -4836,7 +4847,7 @@0 - -41 +-42 2 @@ -4847,7 +4858,7 @@0 - -35 +-36 @@ -4867,24 +4878,13 @@ 0 - -35 +-36 2 :)( E const & x );@] - - -0 -- --36 -- -0 -0 @@ -4904,27 +4904,7 @@- 5 -2 -[@#ifdef BOOST_NO_EXCEPTIONS void (:link -1 -- -0 -- --38 -2 -:)( std::exception const & e ); // user defined #else template <class E> void (:link -1 -- -0 -- --38 -2 -:)( E const & e ); #endif@] +0 @@ -4937,7 +4917,7 @@ 5 2 -[@void (:link +[@#ifdef BOOST_NO_EXCEPTIONS void (:link 1 0 @@ -4946,16 +4926,16 @@2 -:)( (:link +:)( std::exception const & e ); // user defined #else template <class E> void (:link 1 0 - -20 +-39 2 -:) const & ep ); +:)( E const & e ); #endif@] @@ -4966,7 +4946,27 @@ - 0 +5 +2 +[@void (:link +1 ++ +0 ++ +-40 +2 +:)( (:link +1 ++ +0 ++ +-22 +2 +:) const & ep ); @@ -4977,18 +4977,7 @@ - 3 -2 -[@class (:link -1 -- -0 -- --41 -2 -:);@] +0 @@ -5001,7 +4990,7 @@ 3 2 -[@template <class Tag,class T> class (:link +[@class (:link 1 0 @@ -5021,9 +5010,9 @@- 7 +3 2 -[@(:link +[@template <class Tag,class T> class (:link 1 0 @@ -5032,25 +5021,7 @@2 -mod="m":)(); (:link -1 -- -0 -- --43 -2 -mod="m":)( (:link -1 -- -0 -- --41 -2 -:) const & x );@] +:);@] @@ -5061,7 +5032,36 @@ - 0 +7 +2 +[@(:link +1 ++ +0 ++ +-44 +2 +mod="m":)(); (:link +1 ++ +0 ++ +-44 +2 +mod="m":)( (:link +1 ++ +0 ++ +-42 +2 +:) const & x );@] @@ -5273,18 +5273,27 @@ - 29 +19 2 -(:auto !!!:) (:include synopsis:) !!!!Returns: A string value that contains varying amount of implementation-specific diagnostic information about the passed exception object: *If E can be statically converted to boost::(:link +(:auto !!:) Boost Exception responds to the following configuration macros: '''BOOST_NO_RTTI'''\\ '''BOOST_NO_TYPEID''' 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 (:link 1 0 - -41 +-36 2 -:), the returned value contains the string representations of all (:link +:) function template can be called with any exception type. If BOOST_NO_RTTI is defined, (:link +1 ++ +0 ++ +-36 +2 +:) can be used only with objects of type boost::(:link 1 0 @@ -5293,115 +5302,61 @@2 -:) objects stored in the boost::(:link +:). !!!!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, (:link 1 0 - -41 +-25 2 -:) through (:link +:) and (:link 1 0 - -15 +-21 2 -mod="/":), along with other diagnostic information relevant to the exception. If e can be dynamically converted to std::exception, the returned value also contains the what() string. *Otherwise, if E can be statically converted std::exception: **if e can be dynamically converted to boost::exception, the returned value is the same as if E could be statically converted to boost::(:link +:) are integrated directly in the (:link 1 0 - -41 +-39 2 -:); **otherwise the returned value contains the what() string. *Otherwise, the boost:: +:) 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 (:link 1 0 - -5 +-58 2 -template is not available. The string representation of each (:link +:). '''BOOST_NO_EXCEPTIONS''' This macro disables exception handling in Boost, forwarding all exceptions to a user-defined non-template version of boost:: 1 0 - -42 +-39 2 -:) object is deduced by a function call that is bound at the time the (:link +. 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:: 1 0 - -42 +-6 2 -:)<Tag,T> template is instantiated. The following overload resolutions are attempted in order: #Unqualified call to to_string(x), where x is of type (:link -1 -- -0 -- --42 -2 -:)<Tag,T> (the return value is expected to be of type std::string.) #Unqualified call to to_string(x.(:link -1 -- -0 -- --30 -2 -mod="m":)()) (the return value is expected to be of type std::string.) #Unqualified call to s << x.(:link -1 -- -0 -- --30 -2 -mod="m":)(), where s is a std::ostringstream. The first successfully bound function is used at the time (:link -1 -- -0 -- --5 -2 -:) is called; if all 3 overload resolutions are unsuccessful, the system is unable to convert the (:link -1 -- -0 -- --42 -2 -:) object to string, and ''an unspecified stub string value is used without issuing a compile error.'' !!!!Notes: *The format of the returned string is unspecified. *The returned string is ''not'' user-friendly. *The returned string may include additional platform-specific diagnostic information. (:include -1 -- -0 -- --32 -2 -:) +(of course under BOOST_NO_EXCEPTIONS, the user-defined boost::throw_exception is not allowed to return to the caller.) @@ -5414,7 +5369,52 @@ 29 2 -(:auto !!!:) (:include synopsis:) !!!!Requirements: The (:link +(:auto !!!:) (:include synopsis:) !!!!Returns: A string value that contains varying amount of implementation-specific diagnostic information about the passed exception object: *If E can be statically converted to boost::(:link +1 ++ +0 ++ +-42 +2 +:), the returned value contains the string representations of all (:link +1 ++ +0 ++ +-43 +2 +:) objects stored in the boost::(:link +1 ++ +0 ++ +-42 +2 +:) through (:link +1 ++ +0 ++ +-17 +2 +mod="/":), along with other diagnostic information relevant to the exception. If e can be dynamically converted to std::exception, the returned value also contains the what() string. *Otherwise, if E can be statically converted std::exception: **if e can be dynamically converted to boost::exception, the returned value is the same as if E could be statically converted to boost::(:link +1 ++ +0 ++ +-42 +2 +:); **otherwise the returned value contains the what() string. *Otherwise, the boost:: 1 0 @@ -5423,25 +5423,52 @@2 -:) function must not be called outside of a catch block. !!!!Returns: * An (:link +template is not available. The string representation of each (:link 1 0 - -20 +-43 2 -:) that refers to the currently handled exception or a copy of the currently handled exception. * If the function needs to allocate memory and the attempt fails, it returns an (:link +:) object is deduced by a function call that is bound at the time the (:link 1 0 - -20 +-43 2 -:) that refers to an instance of std::bad_alloc. !!!!Throws: Nothing. !!!!Notes: * It is unspecified whether the return values of two successive calls to (:link +:)<Tag,T> template is instantiated. The following overload resolutions are attempted in order: #Unqualified call to to_string(x), where x is of type (:link +1 ++ +0 ++ +-43 +2 +:)<Tag,T> (the return value is expected to be of type std::string.) #Unqualified call to to_string(x.(:link +1 ++ +0 ++ +-31 +2 +mod="m":)()) (the return value is expected to be of type std::string.) #Unqualified call to s << x.(:link +1 ++ +0 ++ +-31 +2 +mod="m":)(), where s is a std::ostringstream. The first successfully bound function is used at the time (:link 1 0 @@ -5450,97 +5477,25 @@2 -:) refer to the same exception object. * Correct implementation of (:link +:) is called; if all 3 overload resolutions are unsuccessful, the system is unable to convert the (:link 1 0 - -6 +-43 2 -:) may require compiler support, unless (:link +:) object to string, and ''an unspecified stub string value is used without issuing a compile error.'' !!!!Notes: *The format of the returned string is unspecified. *The returned string is ''not'' user-friendly. *The returned string may include additional platform-specific diagnostic information. (:include 1 0 - -24 +-33 2 -:) was used at the time the currently handled exception object was passed to throw. If (:link -1 -- -0 -- --24 -2 -:) was not used, and if the compiler does not provide the necessary support, then (:link -1 -- -0 -- --6 -2 -:) may return an (:link -1 -- -0 -- --20 -2 -:) that refers to an instance of (:link -1 -- -0 -- --34 -2 -:). In this case, if the original exception object derives from boost::(:link -1 -- -0 -- --41 -2 -:), then the boost::(:link -1 -- -0 -- --41 -2 -:) sub-object of the (:link -1 -- -0 -- --34 -2 -:) object is initialized by the boost::(:link -1 -- -0 -- --41 -2 -:) copy constructor. +:) @@ -5551,27 +5506,171 @@ - 5 +37 2 -(:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link +(:auto !!!:) When you catch an exception, you can call (:link 1 0 - -41 +-8 2 -:), or a type that derives (indirectly) from boost::(:link +:) to get an (:link 1 0 - -41 +-22 2 -:). !!!!Effects: Equivalent to x << v.(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements|get:)<0>() << ... << v.(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements|get:)<N>(). !!!!Returns: x. (:include throws:) +:) object: [@#include <(:link +1 ++ +0 ++ +-57 +2 +:)> #include <boost/thread.hpp> #include <boost/bind.hpp> void do_work(); //throws cloning-enabled boost::(:link +1 ++ +0 ++ +-42 +2 +:)s void worker_thread( boost::(:link +1 ++ +0 ++ +-22 +2 +:) & error ) { try { do_work(); error = boost::(:link +1 ++ +0 ++ +-22 +2 +:)(); } catch( ... ) { error = boost::(:link +1 ++ +0 ++ +-8 +2 +:)(); } }@] In the above example, note that (:link +1 ++ +0 ++ +-8 +2 +:) captures the original type of the exception object. The exception can be thrown again using the (:link +1 ++ +0 ++ +-40 +2 +:) function: [@// ...continued void work() { boost::(:link +1 ++ +0 ++ +-22 +2 +:) error; boost::(:link http://www.boost.org/doc/html/boost/thread.html|thread:) t( boost::(:link http://www.boost.org/libs/bind/bind.html|bind:)(worker_thread,boost::(:link http://www.boost.org/doc/html/ref.html|ref:)(error)) ); t.(:link http://www.boost.org/doc/html/boost/thread.html|join:)(); if( error ) boost::(:link +1 ++ +0 ++ +-40 +2 +:)(error); }@] Note that (:link +1 ++ +0 ++ +-8 +2 +:) could fail to copy the original exception object in the following cases: * if there is not enough memory, in which case the returned (:link +1 ++ +0 ++ +-22 +2 +:) points to an instance of std::bad_alloc, or * if (:link +1 ++ +0 ++ +-25 +2 +:) was not used in the throw-expression passed to the original throw statement and the current implementation does not have the necessary compiler-specific support to copy the exception automatically, in which case the returned (:link +1 ++ +0 ++ +-22 +2 +:) points to an instance of (:link +1 ++ +0 ++ +-35 +2 +:). Regardless, the use of (:link +1 ++ +0 ++ +-8 +2 +:) and (:link +1 ++ +0 ++ +-40 +2 +:) in the above examples is well-formed. @@ -5582,54 +5681,135 @@ - 11 +29 2 -(:auto !!:) All exception types that derive from boost::(:link +(:auto !!!:) (:include synopsis:) !!!!Requirements: The (:link 1 0 - -41 +-8 2 -:) 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. When exceptions derive from boost::(:link +:) function must not be called outside of a catch block. !!!!Returns: * An (:link 1 0 - -41 +-22 2 -:), arbitrary data can be added to exception objects: *At the point of the throw; *At a later time as exceptions bubble up the call stack. (:include +:) that refers to the currently handled exception or a copy of the currently handled exception. * If the function needs to allocate memory and the attempt fails, it returns an (:link 1 0 - -44 +-22 2 -:) (:include +:) that refers to an instance of std::bad_alloc. !!!!Throws: Nothing. !!!!Notes: * It is unspecified whether the return values of two successive calls to (:link 1 0 - -33 +-8 2 -:) (:include +:) refer to the same exception object. * Correct implementation of (:link 1 0 - -21 +-8 2 -:) +:) may require compiler support, unless (:link +1 ++ +0 ++ +-25 +2 +:) was used at the time the currently handled exception object was passed to throw. If (:link +1 ++ +0 ++ +-25 +2 +:) was not used, and if the compiler does not provide the necessary support, then (:link +1 ++ +0 ++ +-8 +2 +:) may return an (:link +1 ++ +0 ++ +-22 +2 +:) that refers to an instance of (:link +1 ++ +0 ++ +-35 +2 +:). In this case, if the original exception object derives from boost::(:link +1 ++ +0 ++ +-42 +2 +:), then the boost::(:link +1 ++ +0 ++ +-42 +2 +:) sub-object of the (:link +1 ++ +0 ++ +-35 +2 +:) object is initialized by the boost::(:link +1 ++ +0 ++ +-42 +2 +:) copy constructor. @@ -5640,9 +5820,18 @@ - 1 +3 2 -(:auto !!:) !!!Synopsis (:include synopsis:) +(:auto !!!:) (:include synopsis:) !!!!Effects: Stores a copy of v in the +1 ++ +0 ++ +-43 +2 +object. (:include throws:) @@ -5655,25 +5844,25 @@ 5 2 -(:auto !!!:) (:include synopsis:) !!!!Effects: As if [@try { throw +(:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link 1 0 - -24 +-42 2 -(e); } catch(...) { return (:link +:), or a type that derives (indirectly) from boost::(:link 1 0 - -6 +-42 2 -:)(); }@] +:). !!!!Effects: Equivalent to x << v.(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements|get:)<0>() << ... << v.(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements|get:)<N>(). !!!!Returns: x. (:include throws:) @@ -5684,9 +5873,9 @@ - 3 +11 2 -(:auto !!!:) (:include synopsis:) !!!!Effects: Stores a copy of v in the +(:auto !!:) All exception types that derive from boost::(:link 1 0 @@ -5695,7 +5884,43 @@2 -object. (:include throws:) +:) 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. When exceptions derive from boost::(:link +1 ++ +0 ++ +-42 +2 +:), arbitrary data can be added to exception objects: *At the point of the throw; *At a later time as exceptions bubble up the call stack. (:include +1 ++ +0 ++ +-45 +2 +:) (:include +1 ++ +0 ++ +-29 +2 +:) (:include +1 ++ +0 ++ +-24 +2 +:) @@ -5705,6 +5930,50 @@ +-12 ++ +1 +2 +(:auto !!:) !!!Synopsis (:include synopsis:) ++ ++ +0 ++ +-13 ++ +5 +2 +(:auto !!!:) (:include synopsis:) !!!!Effects: As if [@try { throw +1 ++ +0 ++ +-25 +2 +(e); } catch(...) { return (:link +1 ++ +0 ++ +-8 +2 +:)(); }@] ++ -+ 0 ++ +-14 +19 2 @@ -5713,7 +5982,7 @@0 - -5 +-6 2 @@ -5722,7 +5991,7 @@0 - -41 +-42 2 @@ -5731,7 +6000,7 @@0 - -41 +-42 2 @@ -5740,7 +6009,7 @@0 - -15 +-17 2 @@ -5758,7 +6027,7 @@0 - -41 +-42 2 @@ -5767,7 +6036,7 @@0 - -41 +-42 2 @@ -5776,7 +6045,7 @@0 - -5 +-6 2 @@ -5785,7 +6054,7 @@0 - -32 +-33 2 @@ -5796,7 +6065,7 @@0 - -13 +-15 @@ -5809,7 +6078,7 @@ 0 - -14 +-16 @@ -5820,7 +6089,7 @@ 0 - -40 +-41 2 @@ -5829,7 +6098,7 @@0 - -41 +-42 2 @@ -5838,7 +6107,7 @@0 - -19 +-21 2 @@ -5847,7 +6116,7 @@0 - -41 +-42 2 @@ -5856,7 +6125,7 @@0 - -42 +-43 2 @@ -5865,7 +6134,7 @@0 - -41 +-42 2 @@ -5874,7 +6143,7 @@0 - -15 +-17 2 @@ -5883,7 +6152,7 @@0 - -41 +-42 2 @@ -5892,7 +6161,7 @@0 - -41 +-42 2 @@ -5901,7 +6170,7 @@0 - -15 +-17 2 @@ -5910,7 +6179,7 @@0 - -41 +-42 2 @@ -5919,7 +6188,7 @@0 - -41 +-42 2 @@ -5928,7 +6197,7 @@0 - -38 +-39 2 @@ -5937,7 +6206,7 @@0 - -41 +-42 2 @@ -5946,7 +6215,7 @@0 - -6 +-8 2 @@ -5955,7 +6224,7 @@0 - -25 +-26 2 @@ -5964,7 +6233,7 @@0 - -38 +-39 2 @@ -5973,7 +6242,7 @@0 - -5 +-6 2 @@ -5982,7 +6251,7 @@0 - -5 +-6 2 @@ -5991,7 +6260,7 @@0 - -25 +-26 2 @@ -6000,7 +6269,7 @@0 - -38 +-39 2 @@ -6009,7 +6278,7 @@0 - -41 +-42 2 @@ -6018,7 +6287,7 @@0 - -38 +-39 2 @@ -6027,7 +6296,7 @@0 - -41 +-42 2 @@ -6036,7 +6305,7 @@0 - -20 +-22 2 @@ -6045,7 +6314,7 @@0 - -24 +-25 2 @@ -6054,7 +6323,7 @@0 - -38 +-39 2 @@ -6063,7 +6332,7 @@0 - -41 +-42 2 @@ -6072,7 +6341,7 @@0 - -42 +-43 2 @@ -6081,7 +6350,7 @@0 - -15 +-17 2 @@ -6090,7 +6359,7 @@0 - -15 +-17 2 @@ -6099,210 +6368,13 @@0 - -15 +-17 2 |<<:) bar_info(bar);@] which saves typing compared to this possible alternative: [@error e; e.add(foo_info(foo)); e.add(bar_info(bar)); throw e;@] and looks better than something like: [@throw error().add(foo_info(foo)).add(bar_info(bar));@] - -- -0 -- --15 -- -7 -2 -(:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link -1 -- -0 -- --41 -2 -:), or a type that derives (indirectly) from boost::(:link -1 -- -0 -- --41 -2 -:). !!!!Effects: Stores a copy of v into x. If x already contains data of type (:link -1 -- -0 -- --42 -2 -:)<Tag,T>, that data is overwritten. !!!!Returns: x. (:include throws:) -- - -0 -- --16 -- -33 -2 -(:auto !!!:) Traditionally, when using exceptions to report failures, the throw site: *creates an exception object of the appropriate type, and *stuffs it with data relevant to the detected error. A higher context in the program contains a catch statement which: *selects failures based on exception types, and *inspects exception objects for data required to deal with the problem. The main issue with this "traditional" approach is that often, the data available at the point of the throw is insufficient for the catch site to handle the failure. Here is an example of a catch statement: [@catch( file_read_error & e ) { std::cerr << e.file_name(); }@] And here is a possible matching throw: [@void read_file( FILE * f ) { .... size_t nr=fread(buf,1,count,f); if( ferror(f) ) throw file_read_error(???); .... }@] Clearly, the problem is that the handler requires a file name but the read_file function does not have a file name to put in the exception object; all it has is a FILE pointer! In an attempt to deal with this problem, we could modify read_file to accept a file name: [@void read_file( FILE * f, char const * name ) { .... size_t nr=fread(buf,1,count,f); if( ferror(f) ) throw file_read_error(name); .... }@] This is not a real solution: it simply shifts the burden of supplying a file name to the immediate caller of the read_file function. ->''In general, the data required to handle a given library-emitted exception depends on the program that links to it. Many contexts between the throw and the catch may have relevant information which must be transported to the exception handler.'' !!!Exception wrapping The idea of exception wrapping is to catch an exception from a lower level function (such as the read_file function above), and throw a new exception object that contains the original exception (and also carries a file name.) This method seems to be particularly popular with C++ programmers with Java background. Exception wrapping leads to the following problems: *To wrap an exception object it must be copied, which may result in slicing. *Wrapping is practically impossible to use in generic contexts. The second point is actually special case of violating the exception neutrality principle. Most contexts in a program can not handle exceptions; such contexts should not interfere with the process of exception handling. !!!The boost::exception solution *Simply derive your exception types from boost::(:link -1 -- -0 -- --41 -2 -:). *Confidently limit the throw site to provide only data that is available naturally. *Use exception-neutral contexts between the throw and the catch to augment exceptions with more relevant data as they bubble up. For example, in the throw statement below we only add the errno code, since this is the only failure-relevant information available in this context: [@struct exception_base: virtual std::exception, virtual boost::(:link -1 -- -0 -- --41 -2 -:) { }; struct io_error: virtual exception_base { }; struct file_read_error: virtual io_error { }; typedef boost::(:link -1 -- -0 -- --42 -2 -:)<struct tag_errno_code,int> errno_code; void read_file( FILE * f ) { .... size_t nr=fread(buf,1,count,f); if( ferror(f) ) throw file_read_error() (:link -1 -- -0 -- --15 -2 -|<<:) errno_code(errno); .... }@] In a higher exception-neutral context, we add the file name to ''any'' exception that derives from boost::(:link -1 -- -0 -- --41 -2 -:): [@typedef boost::(:link -1 -- -0 -- --42 -2 -:)<struct tag_file_name,std::string> file_name; .... try { if( FILE * fp=fopen("foo.txt","rt") ) { shared_ptr<FILE> f(fp,fclose); .... read_file(fp); //throws types deriving from boost::(:link -1 -- -0 -- --41 -2 -:) do_something(); .... } else throw file_open_error() (:link -1 -- -0 -- --15 -2 -|<<:) errno_code(errno); } catch( boost::(:link -1 -- -0 -- --41 -2 -:) & e ) { e (:link -1 -- -0 -- --15 -2 -|<<:) file_name("foo.txt"); throw; }@] Finally here is how the handler retrieves data from exceptions that derive from boost::(:link -1 -- -0 -- --41 -2 -:): [@catch( io_error & e ) { std::cerr << "I/O Error!\n"; if( std::string const * fn=(:link -1 -- -0 -- --35 -2 -:)<file_name>(e) ) std::cerr << "File name: " << *fn << "\n"; if( int const * c=(:link -1 -- -0 -- --35 -2 -:)<errno_code>(e) ) std::cerr << "OS says: " << strerror(*c) << "\n"; }@] In addition, boost::(:link -1 -- -0 -- --5 -2 -:) can be used to compose an automatic (if not user-friendly) message that contains all of the (:link -1 -- -0 -- --42 -2 -:) objects added to a boost::(:link -1 -- -0 -- --41 -2 -:). This is useful for inclusion in logs and other diagnostic objects. -0 @@ -6313,34 +6385,34 @@7 2 -(:auto !!!:) Deriving from boost::(:link +(:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link 1 0 - -41 +-42 2 -:) effectively decouples the semantics of a failure from the information that is relevant to each individual instance of reporting a failure with a given semantic. In other words: with boost::(:link +:), or a type that derives (indirectly) from boost::(:link 1 0 - -41 +-42 2 -:), what data a given exception object transports depends primarily on the context in which failures are reported (not on its type.) Since exception types need no members, it becomes very natural to throw exceptions that derive from more than one type to indicate multiple appropriate semantics: [@struct exception_base: virtual std::exception, virtual boost::(:link +:). !!!!Effects: Stores a copy of v into x. If x already contains data of type (:link 1 0 - -41 +-43 2 -:) { }; struct io_error: virtual exception_base { }; struct file_error: virtual io_error { }; struct read_error: virtual io_error { }; struct file_read_error: virtual file_error, virtual read_error { };@] Using this approach, exception types become a simple tagging system for categorizing errors and selecting failures in exception handlers. +:)<Tag,T>, that data is overwritten. !!!!Returns: x. (:include throws:) @@ -6350,6 +6422,203 @@ +-18 ++ +33 +2 +(:auto !!!:) Traditionally, when using exceptions to report failures, the throw site: *creates an exception object of the appropriate type, and *stuffs it with data relevant to the detected error. A higher context in the program contains a catch statement which: *selects failures based on exception types, and *inspects exception objects for data required to deal with the problem. The main issue with this "traditional" approach is that often, the data available at the point of the throw is insufficient for the catch site to handle the failure. Here is an example of a catch statement: [@catch( file_read_error & e ) { std::cerr << e.file_name(); }@] And here is a possible matching throw: [@void read_file( FILE * f ) { .... size_t nr=fread(buf,1,count,f); if( ferror(f) ) throw file_read_error(???); .... }@] Clearly, the problem is that the handler requires a file name but the read_file function does not have a file name to put in the exception object; all it has is a FILE pointer! In an attempt to deal with this problem, we could modify read_file to accept a file name: [@void read_file( FILE * f, char const * name ) { .... size_t nr=fread(buf,1,count,f); if( ferror(f) ) throw file_read_error(name); .... }@] This is not a real solution: it simply shifts the burden of supplying a file name to the immediate caller of the read_file function. ->''In general, the data required to handle a given library-emitted exception depends on the program that links to it. Many contexts between the throw and the catch may have relevant information which must be transported to the exception handler.'' !!!Exception wrapping The idea of exception wrapping is to catch an exception from a lower level function (such as the read_file function above), and throw a new exception object that contains the original exception (and also carries a file name.) This method seems to be particularly popular with C++ programmers with Java background. Exception wrapping leads to the following problems: *To wrap an exception object it must be copied, which may result in slicing. *Wrapping is practically impossible to use in generic contexts. The second point is actually special case of violating the exception neutrality principle. Most contexts in a program can not handle exceptions; such contexts should not interfere with the process of exception handling. !!!The boost::exception solution *Simply derive your exception types from boost::(:link +1 ++ +0 ++ +-42 +2 +:). *Confidently limit the throw site to provide only data that is available naturally. *Use exception-neutral contexts between the throw and the catch to augment exceptions with more relevant data as they bubble up. For example, in the throw statement below we only add the errno code, since this is the only failure-relevant information available in this context: [@struct exception_base: virtual std::exception, virtual boost::(:link +1 ++ +0 ++ +-42 +2 +:) { }; struct io_error: virtual exception_base { }; struct file_read_error: virtual io_error { }; typedef boost::(:link +1 ++ +0 ++ +-43 +2 +:)<struct tag_errno_code,int> errno_code; void read_file( FILE * f ) { .... size_t nr=fread(buf,1,count,f); if( ferror(f) ) throw file_read_error() (:link +1 ++ +0 ++ +-17 +2 +|<<:) errno_code(errno); .... }@] In a higher exception-neutral context, we add the file name to ''any'' exception that derives from boost::(:link +1 ++ +0 ++ +-42 +2 +:): [@typedef boost::(:link +1 ++ +0 ++ +-43 +2 +:)<struct tag_file_name,std::string> file_name; .... try { if( FILE * fp=fopen("foo.txt","rt") ) { shared_ptr<FILE> f(fp,fclose); .... read_file(fp); //throws types deriving from boost::(:link +1 ++ +0 ++ +-42 +2 +:) do_something(); .... } else throw file_open_error() (:link +1 ++ +0 ++ +-17 +2 +|<<:) errno_code(errno); } catch( boost::(:link +1 ++ +0 ++ +-42 +2 +:) & e ) { e (:link +1 ++ +0 ++ +-17 +2 +|<<:) file_name("foo.txt"); throw; }@] Finally here is how the handler retrieves data from exceptions that derive from boost::(:link +1 ++ +0 ++ +-42 +2 +:): [@catch( io_error & e ) { std::cerr << "I/O Error!\n"; if( std::string const * fn=(:link +1 ++ +0 ++ +-36 +2 +:)<file_name>(e) ) std::cerr << "File name: " << *fn << "\n"; if( int const * c=(:link +1 ++ +0 ++ +-36 +2 +:)<errno_code>(e) ) std::cerr << "OS says: " << strerror(*c) << "\n"; }@] In addition, boost::(:link +1 ++ +0 ++ +-6 +2 +:) can be used to compose an automatic (if not user-friendly) message that contains all of the (:link +1 ++ +0 ++ +-43 +2 +:) objects added to a boost::(:link +1 ++ +0 ++ +-42 +2 +:). This is useful for inclusion in logs and other diagnostic objects. ++ ++ +0 ++ +-19 ++ +7 +2 +(:auto !!!:) Deriving from boost::(:link +1 ++ +0 ++ +-42 +2 +:) effectively decouples the semantics of a failure from the information that is relevant to each individual instance of reporting a failure with a given semantic. In other words: with boost::(:link +1 ++ +0 ++ +-42 +2 +:), what data a given exception object transports depends primarily on the context in which failures are reported (not on its type.) Since exception types need no members, it becomes very natural to throw exceptions that derive from more than one type to indicate multiple appropriate semantics: [@struct exception_base: virtual std::exception, virtual boost::(:link +1 ++ +0 ++ +-42 +2 +:) { }; struct io_error: virtual exception_base { }; struct file_error: virtual io_error { }; struct read_error: virtual io_error { }; struct file_read_error: virtual file_error, virtual read_error { };@] Using this approach, exception types become a simple tagging system for categorizing errors and selecting failures in exception handlers. ++ ++ 0 ++ +-20 +27 2 @@ -6358,7 +6627,7 @@0 - -41 +-42 2 @@ -6367,7 +6636,7 @@0 - -19 +-21 2 @@ -6376,7 +6645,7 @@0 - -41 +-42 2 @@ -6394,7 +6663,7 @@0 - -42 +-43 2 @@ -6403,7 +6672,7 @@0 - -42 +-43 2 @@ -6412,7 +6681,7 @@0 - -42 +-43 2 @@ -6421,7 +6690,7 @@0 - -19 +-21 2 @@ -6430,7 +6699,7 @@0 - -19 +-21 2 @@ -6439,7 +6708,7 @@0 - -41 +-42 2 @@ -6448,7 +6717,7 @@0 - -15 +-17 2 @@ -6457,7 +6726,7 @@0 - -41 +-42 2 @@ -6466,7 +6735,7 @@0 - -8 +-11 2 @@ -6477,7 +6746,7 @@0 - -19 +-21 @@ -6488,7 +6757,7 @@ 0 - -41 +-42 2 @@ -6497,7 +6766,7 @@0 - -41 +-42 2 @@ -6508,7 +6777,7 @@0 - -20 +-22 @@ -6519,7 +6788,7 @@ 0 - -20 +-22 2 @@ -6528,7 +6797,7 @@0 - -20 +-22 2 @@ -6537,7 +6806,7 @@0 - -20 +-22 2 @@ -6546,7 +6815,7 @@0 - -20 +-22 2 @@ -6555,7 +6824,7 @@0 - -20 +-22 2 @@ -6564,7 +6833,7 @@0 - -20 +-22 2 @@ -6573,7 +6842,7 @@0 - -6 +-8 2 @@ -6582,7 +6851,7 @@0 - -39 +-40 2 @@ -6593,7 +6862,29 @@+ 0 - +-21 +-23 ++ +3 +2 +(:auto !!!:) (:include decl:) !!!!Effects: Frees all resources associated with a boost::(:link +1 ++ +0 ++ +-42 +2 +:) object. !!!!Throws: Nothing. ++ -+ 0 ++ -24 @@ -6613,7 +6904,7 @@ 0 - -42 +-43 2 @@ -6622,7 +6913,7 @@0 - -42 +-43 2 @@ -6631,7 +6922,7 @@0 - -42 +-43 2 @@ -6640,7 +6931,7 @@0 - -41 +-42 2 @@ -6649,7 +6940,7 @@0 - -35 +-36 2 @@ -6660,276 +6951,7 @@- 0 - --22 -- -37 -2 -(:auto !!!:) When you catch an exception, you can call (:link -1 -- -0 -- --6 -2 -:) to get an (:link -1 -- -0 -- --20 -2 -:) object: [@#include <(:link -1 -- -0 -- --57 -2 -:)> #include <boost/thread.hpp> #include <boost/bind.hpp> void do_work(); //throws cloning-enabled boost::(:link -1 -- -0 -- --41 -2 -:)s void worker_thread( boost::(:link -1 -- -0 -- --20 -2 -:) & error ) { try { do_work(); error = boost::(:link -1 -- -0 -- --20 -2 -:)(); } catch( ... ) { error = boost::(:link -1 -- -0 -- --6 -2 -:)(); } }@] In the above example, note that (:link -1 -- -0 -- --6 -2 -:) captures the original type of the exception object. The exception can be thrown again using the (:link -1 -- -0 -- --39 -2 -:) function: [@// ...continued void work() { boost::(:link -1 -- -0 -- --20 -2 -:) error; boost::(:link http://www.boost.org/doc/html/boost/thread.html|thread:) t( boost::(:link http://www.boost.org/libs/bind/bind.html|bind:)(worker_thread,boost::(:link http://www.boost.org/doc/html/ref.html|ref:)(error)) ); t.(:link http://www.boost.org/doc/html/boost/thread.html|join:)(); if( error ) boost::(:link -1 -- -0 -- --39 -2 -:)(error); }@] Note that (:link -1 -- -0 -- --6 -2 -:) could fail to copy the original exception object in the following cases: * if there is not enough memory, in which case the returned (:link -1 -- -0 -- --20 -2 -:) points to an instance of std::bad_alloc, or * if (:link -1 -- -0 -- --24 -2 -:) was not used in the throw-expression passed to the original throw statement and the current implementation does not have the necessary compiler-specific support to copy the exception automatically, in which case the returned (:link -1 -- -0 -- --20 -2 -:) points to an instance of (:link -1 -- -0 -- --34 -2 -:). Regardless, the use of (:link -1 -- -0 -- --6 -2 -:) and (:link -1 -- -0 -- --39 -2 -:) in the above examples is well-formed. -- -- -0 -- --23 -- -19 -2 -(:auto !!:) Boost Exception responds to the following configuration macros: '''BOOST_NO_RTTI'''\\ '''BOOST_NO_TYPEID''' 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 (:link -1 -- -0 -- --35 -2 -:) function template can be called with any exception type. If BOOST_NO_RTTI is defined, (:link -1 -- -0 -- --35 -2 -:) can be used only with objects of type boost::(:link -1 -- -0 -- --41 -2 -:). !!!!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, (:link -1 -- -0 -- --24 -2 -:) and (:link -1 -- -0 -- --19 -2 -:) are integrated directly in the (:link -1 -- -0 -- --38 -2 -:) 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 (:link -1 -- -0 -- --58 -2 -:). '''BOOST_NO_EXCEPTIONS''' This macro disables exception handling in Boost, forwarding all exceptions to a user-defined non-template version of boost:: -1 -- -0 -- --38 -2 -. 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:: -1 -- -0 -- --5 -2 -(of course under BOOST_NO_EXCEPTIONS, the user-defined boost::throw_exception is not allowed to return to the caller.) -- -- 0 -- -24 +-25 @@ -6940,7 +6962,7 @@ 0 - -20 +-22 2 @@ -6949,7 +6971,7 @@0 - -24 +-25 2 @@ -6958,7 +6980,7 @@0 - -24 +-25 2 @@ -6967,7 +6989,7 @@0 - -6 +-8 2 @@ -6976,7 +6998,7 @@0 - -20 +-22 2 @@ -6985,7 +7007,7 @@0 - -34 +-35 2 @@ -6994,7 +7016,7 @@0 - -6 +-8 2 @@ -7003,7 +7025,7 @@0 - -38 +-39 2 @@ -7012,7 +7034,7 @@0 - -41 +-42 2 @@ -7021,7 +7043,7 @@0 - -20 +-22 2 @@ -7032,7 +7054,7 @@0 - -25 +-26 @@ -7043,7 +7065,7 @@ 0 - -38 +-39 2 @@ -7052,7 +7074,7 @@0 - -35 +-36 2 @@ -7061,35 +7083,13 @@0 - -5 +-6 2 . - - -0 -- --26 -- -3 -2 -(:auto !!!:) (:include decl:) !!!!Effects: Frees all resources associated with a boost::(:link -1 -- -0 -- --41 -2 -:) object. !!!!Throws: Nothing. -- - 0 @@ -7118,7 +7118,7 @@0 - -41 +-42 2 @@ -7127,7 +7127,7 @@0 - -5 +-6 2 @@ -7159,85 +7159,6 @@-29 - -1 -2 -(:auto !!!:) (:include synopsis:) !!!!Requirements: This function must not be called outside of a catch block. !!!!Returns: A pointer of type E to the current exception object, or null if the current exception object can not be converted to E *. !!!!Throws: Nothing. -- -- -0 -- --30 -- -5 -2 -(:auto !!!:) (:include synopsis:) !!!!Description: Returns a const reference to the copy of the value passed to (:link -1 -- -0 -- --42 -2 -:)'s constructor stored in the (:link -1 -- -0 -- --42 -2 -:) object. !!!!Throws: Nothing. -- -- -0 -- --31 -- -1 -2 -(:auto !!:) !!!Synopsis (:include synopsis:) -- -- -0 -- --32 -- -3 -2 -!!!!Example: this is a possible output from the (:link -1 -- -0 -- --5 -2 -:) function, as used in ''libs/exception/example/example_io.cpp:'' [@example_io.cpp(83): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *) Dynamic exception type: class boost::exception_detail::clone_impl<class fopen_error> std::exception::what: example_io error [struct tag_errno *] = 2, OS says "No such file or directory" [struct tag_file_name *] = tmp1.txt [struct tag_function *] = fopen [struct tag_open_mode *] = rb@] -- +- 0 -- --33 -19 2 @@ -7246,7 +7167,7 @@0 - -41 +-42 2 @@ -7264,7 +7185,7 @@0 - -42 +-43 2 @@ -7273,7 +7194,7 @@0 - -41 +-42 2 @@ -7291,7 +7212,7 @@0 - -42 +-43 2 @@ -7300,7 +7221,7 @@0 - -41 +-42 2 @@ -7309,7 +7230,7 @@0 - -41 +-42 2 @@ -7318,13 +7239,92 @@0 - -41 +-42 2 :) 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''. + ++ +0 ++ +-30 ++ +1 +2 +(:auto !!!:) (:include synopsis:) !!!!Requirements: This function must not be called outside of a catch block. !!!!Returns: A pointer of type E to the current exception object, or null if the current exception object can not be converted to E *. !!!!Throws: Nothing. ++ ++ +0 ++ +-31 ++ +5 +2 +(:auto !!!:) (:include synopsis:) !!!!Description: Returns a const reference to the copy of the value passed to (:link +1 ++ +0 ++ +-43 +2 +:)'s constructor stored in the (:link +1 ++ +0 ++ +-43 +2 +:) object. !!!!Throws: Nothing. ++ ++ +0 ++ +-32 ++ +1 +2 +(:auto !!:) !!!Synopsis (:include synopsis:) ++ + +0 ++ +-33 ++ +3 +2 +!!!!Example: this is a possible output from the (:link +1 ++ +0 ++ +-6 +2 +:) function, as used in ''libs/exception/example/example_io.cpp:'' [@example_io.cpp(83): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *) Dynamic exception type: class boost::exception_detail::clone_impl<class fopen_error> std::exception::what: example_io error [struct tag_errno *] = 2, OS says "No such file or directory" [struct tag_file_name *] = tmp1.txt [struct tag_function *] = fopen [struct tag_open_mode *] = rb@] +- - 0 @@ -7332,1048 +7332,6 @@-34 - -5 -2 -(:auto !!!:) (:include synopsis:) This type is used by the (:link -1 -- -0 -- --20 -2 -:) support in Boost Exception. Please see (:link -1 -- -0 -- --6 -2 -:). -- -- -0 -- --35 -- -13 -2 -(:auto !!!:) (:include synopsis:) !!!!Requirements: * ErrorInfo must be an instance of the (:link -1 -- -0 -- --42 -2 -:) template. * E must be polymorphic. !!!!Returns: * If dynamic_cast<boost::(:link -1 -- -0 -- --41 -2 -:) const *>(&x) is 0, or if x does not store an object of type ErrorInfo, the returned value is null. * Otherwise, the returned pointer points to the stored value (use (:link -1 -- -0 -- --15 -2 -mod="/":) to store values in exception objects.) When x is destroyed, any pointers returned by (:link -1 -- -0 -- --35 -2 -:) become invalid. !!!!Throws: Nothing. !!!!Note: The interface of (:link -1 -- -0 -- --35 -2 -:) may be affected by the build (:link -1 -- -0 -- --23 -2 -:). -- -- -0 -- --36 -- -69 -2 -!!Introduction The purpose of Boost Exception is to ease the design of exception class hierarchies and to help write exception handling and error reporting code. It supports transporting of arbitrary data to the catch site, which is otherwise tricky due to the no-throw requirements (15.5.1) for exception types. Data can be added to any exception object, either directly in the throw-expression (15.1), or at a later time as the exception object propagates up the call stack. 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 (:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:)-style (:link -1 -- -0 -- --37 -2 -|copying:) of exception objects, implemented non-intrusively and automatically by the boost::(:link -1 -- -0 -- --38 -2 -:) function. !!Contents #(:link -1 -- -0 -- --16 -2 -:) #Tutorial ##(:link -1 -- -0 -- --8 -2 -mod="w":) ##(:link -1 -- -0 -- --18 -2 -mod="w":) ##(:link -1 -- -0 -- --37 -2 -mod="w":) ##(:link -1 -- -0 -- --17 -2 -mod="w":) ##(:link -1 -- -0 -- --40 -2 -mod="w":) ##(:link -1 -- -0 -- --12 -2 -mod="w":) #Documentation ##Class (:link -1 -- -0 -- --41 -2 -:) ##Throwing Exceptions ###(:link -1 -- -0 -- --25 -2 -:) ###(:link -1 -- -0 -- --38 -2 -:) ##Transporting of Arbitrary Data to the Catch Site ###(:link -1 -- -0 -- --42 -2 -:) ###(:link -1 -- -0 -- --15 -2 -:) ###(:link -1 -- -0 -- --7 -2 -:) ###(:link -1 -- -0 -- --35 -2 -:) ###(:link -1 -- -0 -- --19 -2 -:) ##(:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:) Transporting of Exceptions between Threads ###(:link -1 -- -0 -- --20 -2 -:) ###(:link -1 -- -0 -- --24 -2 -:) ###(:link -1 -- -0 -- --6 -2 -:) ###(:link -1 -- -0 -- --10 -2 -:) ###(:link -1 -- -0 -- --39 -2 -:) ###(:link -1 -- -0 -- --34 -2 -:) ##Diagnostic Information ###(:link -1 -- -0 -- --5 -2 -:) ###(:link -1 -- -0 -- --28 -2 -:) ##(:link -1 -- -0 -- --29 -2 -:) #API ##(:link -1 -- -0 -- --47 -2 -:) ##(:link -1 -- -0 -- --53 -2 -:) ##(:link -1 -- -0 -- --45 -2 -:) ##(:link -1 -- -0 -- --48 -2 -:) ##(:link -1 -- -0 -- --55 -2 -:) ##(:link -1 -- -0 -- --23 -2 -mod="w":) #(:link -1 -- -0 -- --14 -2 -mod="w":) #(:link -1 -- -0 -- --59 -2 -mod="w":) !!!Acknowledgements Thanks to Peter Dimov for his continuing help. Also thanks to Tobias Schwinger, Tom Brinkman, Pavel Vozenilek and everyone who participated in the review process. -- -- -0 -- --37 -- -11 -2 -(:auto !!:) Boost Exception supports transporting of exception objects between threads through cloning. This system is similar to (:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:), but because Boost Exception can not rely on language support, the use of (:link -1 -- -0 -- --24 -2 -:) at the time of the throw is required in order to use cloning. !!!!Note: All exceptions emitted by the familiar function boost::(:link -1 -- -0 -- --38 -2 -:) are guaranteed to derive from boost::(:link -1 -- -0 -- --41 -2 -:) and to support cloning. (:include -1 -- -0 -- --46 -2 -:) (:include -1 -- -0 -- --22 -2 -:) -- -- -0 -- --38 -- -17 -2 -(:auto !!!:) (:include synopsis:) !!!!Requirements: E must derive publicly from std::exception. !!!!Effects: * If BOOST_NO_EXCEPTIONS is not defined, boost::(:link -1 -- -0 -- --38 -2 -:)(e) is equivalent to throw boost::(:link -1 -- -0 -- --24 -2 -:)(boost::(:link -1 -- -0 -- --19 -2 -:)(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::(:link -1 -- -0 -- --38 -2 -:)(e) is equivalent to throw e; * If BOOST_NO_EXCEPTIONS is defined, the function is left undefined, and the user is expected to supply an appropriate definition. Callers of (:link -1 -- -0 -- --38 -2 -:) are allowed to assume that the function never returns; therefore, if the user-defined (:link -1 -- -0 -- --38 -2 -:) returns, the behavior is undefined. !!!!Note: Under BOOST_NO_EXCEPTIONS, unless BOOST_EXCEPTION_DISABLE is also defined, users can examine the passed exception object using boost:: -1 -- -0 -- --35 -2 -, or format an automatic diagnostic message using boost:: -1 -- -0 -- --5 -2 -. -- -- -0 -- --39 -- -1 -2 -(:auto !!!:) (:include synopsis:) !!!!Precondition: ep shall not be null. !!!!Throws: The exception to which ep refers. -- -- -0 -- --40 -- -5 -2 -(:auto !!!:) Exception types should use virtual inheritance when deriving from other exception types. This insight is due to Andrew Koenig. Using virtual inheritance prevents ambiguity problems in the exception handler: [@#include <iostream> struct my_exc1 : std::exception { char const* what() const throw(); }; struct my_exc2 : std::exception { char const* what() const throw(); }; struct your_exc3 : my_exc1, my_exc2 {}; int main() { try { throw your_exc3(); } catch(std::exception const& e) {} catch(...) { std::cout << "whoops!" << std::endl; } }@] The program above outputs "whoops!" because the conversion to std::exception is ambiguous. The overhead introduced by virtual inheritance is always negligible in the context of exception handling. Note that virtual bases are initialized directly by the constructor of the most-derived-type (the type passed to the throw statement, in case of exceptions.) However, typically this detail is of no concern when boost::(:link -1 -- -0 -- --41 -2 -:) is used, because it enables exception types to be trivial structs with no members (there's nothing to initialize.) See (:link -1 -- -0 -- --17 -2 -mod="w":). -- -- -0 -- --41 -- -13 -2 -(:auto !!!:) (:include synopsis:) Class boost::(:link -1 -- -0 -- --41 -2 -:) is designed to be used as a universal base for user-defined exception types. An object of any type deriving from boost::(:link -1 -- -0 -- --41 -2 -:) can store data of arbitrary types, using the (:link -1 -- -0 -- --42 -2 -:) wrapper and (:link -1 -- -0 -- --15 -2 -mod="/":). To retrieve data from a boost::(:link -1 -- -0 -- --41 -2 -:) object, use the (:link -1 -- -0 -- --35 -2 -:) function template. -- -- -0 -- --42 -- -37 -2 -(:auto !!!:) (:include synopsis:) !!!!Requirements: T must have accessible copy constructor and must not be a reference (there is no requirement that T's copy constructor does not throw.) !!!!Description: This class template is used to associate a Tag type with a value type T. Objects of type (:link -1 -- -0 -- --42 -2 -:)<Tag,T> can be passed to (:link -1 -- -0 -- --15 -2 -mod="/":) to be stored in objects of type boost::(:link -1 -- -0 -- --41 -2 -:). !!!!Usage: The header <(:link -1 -- -0 -- --54 -2 -:)> provides a declaration of the (:link -1 -- -0 -- --42 -2 -:) template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, for example: [@#include <(:link -1 -- -0 -- --54 -2 -:)> struct tag_errno; typedef boost::(:link -1 -- -0 -- --42 -2 -:)<tag_errno,int> errno_info;@] Or, the shorter equivalent: [@#include <(:link -1 -- -0 -- --54 -2 -:)> typedef boost::(:link -1 -- -0 -- --42 -2 -:)<struct tag_errno,int> errno_info;@] This errno_info typedef can be passed to (:link -1 -- -0 -- --15 -2 -mod="/":) (#include <(:link -1 -- -0 -- --56 -2 -:)> first) to store an int named tag_errno in exceptions of types that derive from boost::(:link -1 -- -0 -- --41 -2 -:): [@throw file_read_error() (:link -1 -- -0 -- --15 -2 -|<<:) errno_info(errno);@] It can also be passed to -1 -- -0 -- --35 -2 -(#include < -1 -- -0 -- --13 -2 -> first) to retrieve the tag_errno int from a boost::(:link -1 -- -0 -- --41 -2 -:): [@catch( boost::(:link -1 -- -0 -- --41 -2 -:) & x ) { if( boost::shared_ptr<int const> e=boost:: -1 -- -0 -- --35 -2 -<errno_info>(x) ) .... }@] -- -- -0 -- --43 -- -7 -2 -(:auto !!!:) (:include decl:) !!!!Effects: * Default constructor: initializes an empty boost::(:link -1 -- -0 -- --41 -2 -:) object. * Copy constructor: initializes a boost::(:link -1 -- -0 -- --41 -2 -:) object which shares ownership with x of all data added through (:link -1 -- -0 -- --15 -2 -mod="/":), including data that is added at a future time. !!!!Throws: Nothing. -- -- -0 -- --44 -- -17 -2 -(:auto !!!:) The following example demonstrates how errno can be stored in exception objects using Boost Exception: [@#include <(:link -1 -- -0 -- --50 -2 -:)> #include <errno.h> #include <iostream> typedef boost::(:link -1 -- -0 -- --42 -2 -:)<struct tag_errno,int> errno_info; //(1) class my_error: public boost::(:link -1 -- -0 -- --41 -2 -:), public std::exception { }; //(2) void f() { throw my_error() << errno_info(errno); //(3) } @] First, we instantiate the (:link -1 -- -0 -- --42 -2 -:) template using a unique identifier -- tag_errno, and the type of the info it identifies -- int. This provides compile-time type safety for the various values stored in exception objects. Second, we define class my_error, which derives from boost::(:link -1 -- -0 -- --41 -2 -:). Finally, (3) illustrates how the typedef from (1) can be used with (:link -1 -- -0 -- --15 -2 -|operator<<:) to store values in exception objects at the point of the throw. The stored errno value can be recovered at a later time like this: [@// ...continued void g() { try { f(); } catch( my_error & x ) { if( int const * err=boost::(:link -1 -- -0 -- --35 -2 -:)<errno_info>(x) ) std::cerr << "Error code: " << *err; } }@] The (:link -1 -- -0 -- --35 -2 -:) 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, err will point to it; otherwise a null pointer is returned. -- -- -0 -- --45 -- -1 -2 -(:auto !!:) (:pagelist fmt="index" tags="type":) -- -- -0 -- --46 -- -11 -2 -(:auto !!!:) Here is how cloning can be enabled in a throw-expression (15.1): [@#include <(:link -1 -- -0 -- --56 -2 -:)> #include <stdio.h> #include <errno.h> typedef boost::error_info<struct tag_errno,int> errno_info; class file_read_error: public boost::(:link -1 -- -0 -- --41 -2 -:) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw boost::(:link -1 -- -0 -- --24 -2 -:)(file_read_error()) << errno_info(errno); }@] Of course, (:link -1 -- -0 -- --24 -2 -:) may be used with any exception type; there is no requirement that it should derive from boost::(:link -1 -- -0 -- --41 -2 -:). -- +- 0 -- --47 -45 2 @@ -8382,7 +7340,7 @@0 - -9 +-12 2 @@ -8391,7 +7349,7 @@0 - -9 +-12 2 @@ -8472,7 +7430,7 @@0 - -31 +-32 2 @@ -8481,7 +7439,7 @@0 - -31 +-32 2 @@ -8578,6 +7536,1048 @@synopsis:) + ++ +0 ++ +-35 ++ +5 +2 +(:auto !!!:) (:include synopsis:) This type is used by the (:link +1 ++ +0 ++ +-22 +2 +:) support in Boost Exception. Please see (:link +1 ++ +0 ++ +-8 +2 +:). ++ ++ +0 ++ +-36 ++ +13 +2 +(:auto !!!:) (:include synopsis:) !!!!Requirements: * ErrorInfo must be an instance of the (:link +1 ++ +0 ++ +-43 +2 +:) template. * E must be polymorphic. !!!!Returns: * If dynamic_cast<boost::(:link +1 ++ +0 ++ +-42 +2 +:) const *>(&x) is 0, or if x does not store an object of type ErrorInfo, the returned value is null. * Otherwise, the returned pointer points to the stored value (use (:link +1 ++ +0 ++ +-17 +2 +mod="/":) to store values in exception objects.) When x is destroyed, any pointers returned by (:link +1 ++ +0 ++ +-36 +2 +:) become invalid. !!!!Throws: Nothing. !!!!Note: The interface of (:link +1 ++ +0 ++ +-36 +2 +:) may be affected by the build (:link +1 ++ +0 ++ +-5 +2 +:). ++ ++ +0 ++ +-37 ++ +69 +2 +!!Introduction The purpose of Boost Exception is to ease the design of exception class hierarchies and to help write exception handling and error reporting code. It supports transporting of arbitrary data to the catch site, which is otherwise tricky due to the no-throw requirements (15.5.1) for exception types. Data can be added to any exception object, either directly in the throw-expression (15.1), or at a later time as the exception object propagates up the call stack. 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 (:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:)-style (:link +1 ++ +0 ++ +-38 +2 +|copying:) of exception objects, implemented non-intrusively and automatically by the boost::(:link +1 ++ +0 ++ +-39 +2 +:) function. !!Contents #(:link +1 ++ +0 ++ +-18 +2 +:) #Tutorial ##(:link +1 ++ +0 ++ +-11 +2 +mod="w":) ##(:link +1 ++ +0 ++ +-20 +2 +mod="w":) ##(:link +1 ++ +0 ++ +-38 +2 +mod="w":) ##(:link +1 ++ +0 ++ +-19 +2 +mod="w":) ##(:link +1 ++ +0 ++ +-41 +2 +mod="w":) ##(:link +1 ++ +0 ++ +-14 +2 +mod="w":) #Documentation ##Class (:link +1 ++ +0 ++ +-42 +2 +:) ##Throwing Exceptions ###(:link +1 ++ +0 ++ +-26 +2 +:) ###(:link +1 ++ +0 ++ +-39 +2 +:) ##Transporting of Arbitrary Data to the Catch Site ###(:link +1 ++ +0 ++ +-43 +2 +:) ###(:link +1 ++ +0 ++ +-17 +2 +:) ###(:link +1 ++ +0 ++ +-10 +2 +:) ###(:link +1 ++ +0 ++ +-36 +2 +:) ###(:link +1 ++ +0 ++ +-21 +2 +:) ##(:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:) Transporting of Exceptions between Threads ###(:link +1 ++ +0 ++ +-22 +2 +:) ###(:link +1 ++ +0 ++ +-25 +2 +:) ###(:link +1 ++ +0 ++ +-8 +2 +:) ###(:link +1 ++ +0 ++ +-13 +2 +:) ###(:link +1 ++ +0 ++ +-40 +2 +:) ###(:link +1 ++ +0 ++ +-35 +2 +:) ##Diagnostic Information ###(:link +1 ++ +0 ++ +-6 +2 +:) ###(:link +1 ++ +0 ++ +-28 +2 +:) ##(:link +1 ++ +0 ++ +-30 +2 +:) #API ##(:link +1 ++ +0 ++ +-34 +2 +:) ##(:link +1 ++ +0 ++ +-53 +2 +:) ##(:link +1 ++ +0 ++ +-46 +2 +:) ##(:link +1 ++ +0 ++ +-48 +2 +:) ##(:link +1 ++ +0 ++ +-55 +2 +:) ##(:link +1 ++ +0 ++ +-5 +2 +mod="w":) #(:link +1 ++ +0 ++ +-16 +2 +mod="w":) #(:link +1 ++ +0 ++ +-59 +2 +mod="w":) !!!Acknowledgements Thanks to Peter Dimov for his continuing help. Also thanks to Tobias Schwinger, Tom Brinkman, Pavel Vozenilek and everyone who participated in the review process. ++ ++ +0 ++ +-38 ++ +11 +2 +(:auto !!:) Boost Exception supports transporting of exception objects between threads through cloning. This system is similar to (:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:), but because Boost Exception can not rely on language support, the use of (:link +1 ++ +0 ++ +-25 +2 +:) at the time of the throw is required in order to use cloning. !!!!Note: All exceptions emitted by the familiar function boost::(:link +1 ++ +0 ++ +-39 +2 +:) are guaranteed to derive from boost::(:link +1 ++ +0 ++ +-42 +2 +:) and to support cloning. (:include +1 ++ +0 ++ +-47 +2 +:) (:include +1 ++ +0 ++ +-7 +2 +:) ++ ++ +0 ++ +-39 ++ +17 +2 +(:auto !!!:) (:include synopsis:) !!!!Requirements: E must derive publicly from std::exception. !!!!Effects: * If BOOST_NO_EXCEPTIONS is not defined, boost::(:link +1 ++ +0 ++ +-39 +2 +:)(e) is equivalent to throw boost::(:link +1 ++ +0 ++ +-25 +2 +:)(boost::(:link +1 ++ +0 ++ +-21 +2 +:)(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::(:link +1 ++ +0 ++ +-39 +2 +:)(e) is equivalent to throw e; * If BOOST_NO_EXCEPTIONS is defined, the function is left undefined, and the user is expected to supply an appropriate definition. Callers of (:link +1 ++ +0 ++ +-39 +2 +:) are allowed to assume that the function never returns; therefore, if the user-defined (:link +1 ++ +0 ++ +-39 +2 +:) returns, the behavior is undefined. !!!!Note: Under BOOST_NO_EXCEPTIONS, unless BOOST_EXCEPTION_DISABLE is also defined, users can examine the passed exception object using boost:: +1 ++ +0 ++ +-36 +2 +, or format an automatic diagnostic message using boost:: +1 ++ +0 ++ +-6 +2 +. ++ ++ +0 ++ +-40 ++ +1 +2 +(:auto !!!:) (:include synopsis:) !!!!Precondition: ep shall not be null. !!!!Throws: The exception to which ep refers. ++ ++ +0 ++ +-41 ++ +5 +2 +(:auto !!!:) Exception types should use virtual inheritance when deriving from other exception types. This insight is due to Andrew Koenig. Using virtual inheritance prevents ambiguity problems in the exception handler: [@#include <iostream> struct my_exc1 : std::exception { char const* what() const throw(); }; struct my_exc2 : std::exception { char const* what() const throw(); }; struct your_exc3 : my_exc1, my_exc2 {}; int main() { try { throw your_exc3(); } catch(std::exception const& e) {} catch(...) { std::cout << "whoops!" << std::endl; } }@] The program above outputs "whoops!" because the conversion to std::exception is ambiguous. The overhead introduced by virtual inheritance is always negligible in the context of exception handling. Note that virtual bases are initialized directly by the constructor of the most-derived-type (the type passed to the throw statement, in case of exceptions.) However, typically this detail is of no concern when boost::(:link +1 ++ +0 ++ +-42 +2 +:) is used, because it enables exception types to be trivial structs with no members (there's nothing to initialize.) See (:link +1 ++ +0 ++ +-19 +2 +mod="w":). ++ ++ +0 ++ +-42 ++ +13 +2 +(:auto !!!:) (:include synopsis:) Class boost::(:link +1 ++ +0 ++ +-42 +2 +:) is designed to be used as a universal base for user-defined exception types. An object of any type deriving from boost::(:link +1 ++ +0 ++ +-42 +2 +:) can store data of arbitrary types, using the (:link +1 ++ +0 ++ +-43 +2 +:) wrapper and (:link +1 ++ +0 ++ +-17 +2 +mod="/":). To retrieve data from a boost::(:link +1 ++ +0 ++ +-42 +2 +:) object, use the (:link +1 ++ +0 ++ +-36 +2 +:) function template. ++ ++ +0 ++ +-43 ++ +37 +2 +(:auto !!!:) (:include synopsis:) !!!!Requirements: T must have accessible copy constructor and must not be a reference (there is no requirement that T's copy constructor does not throw.) !!!!Description: This class template is used to associate a Tag type with a value type T. Objects of type (:link +1 ++ +0 ++ +-43 +2 +:)<Tag,T> can be passed to (:link +1 ++ +0 ++ +-17 +2 +mod="/":) to be stored in objects of type boost::(:link +1 ++ +0 ++ +-42 +2 +:). !!!!Usage: The header <(:link +1 ++ +0 ++ +-54 +2 +:)> provides a declaration of the (:link +1 ++ +0 ++ +-43 +2 +:) template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, for example: [@#include <(:link +1 ++ +0 ++ +-54 +2 +:)> struct tag_errno; typedef boost::(:link +1 ++ +0 ++ +-43 +2 +:)<tag_errno,int> errno_info;@] Or, the shorter equivalent: [@#include <(:link +1 ++ +0 ++ +-54 +2 +:)> typedef boost::(:link +1 ++ +0 ++ +-43 +2 +:)<struct tag_errno,int> errno_info;@] This errno_info typedef can be passed to (:link +1 ++ +0 ++ +-17 +2 +mod="/":) (#include <(:link +1 ++ +0 ++ +-56 +2 +:)> first) to store an int named tag_errno in exceptions of types that derive from boost::(:link +1 ++ +0 ++ +-42 +2 +:): [@throw file_read_error() (:link +1 ++ +0 ++ +-17 +2 +|<<:) errno_info(errno);@] It can also be passed to +1 ++ +0 ++ +-36 +2 +(#include < +1 ++ +0 ++ +-15 +2 +> first) to retrieve the tag_errno int from a boost::(:link +1 ++ +0 ++ +-42 +2 +:): [@catch( boost::(:link +1 ++ +0 ++ +-42 +2 +:) & x ) { if( boost::shared_ptr<int const> e=boost:: +1 ++ +0 ++ +-36 +2 +<errno_info>(x) ) .... }@] ++ ++ +0 ++ +-44 ++ +7 +2 +(:auto !!!:) (:include decl:) !!!!Effects: * Default constructor: initializes an empty boost::(:link +1 ++ +0 ++ +-42 +2 +:) object. * Copy constructor: initializes a boost::(:link +1 ++ +0 ++ +-42 +2 +:) object which shares ownership with x of all data added through (:link +1 ++ +0 ++ +-17 +2 +mod="/":), including data that is added at a future time. !!!!Throws: Nothing. ++ ++ +0 ++ +-45 ++ +17 +2 +(:auto !!!:) The following example demonstrates how errno can be stored in exception objects using Boost Exception: [@#include <(:link +1 ++ +0 ++ +-50 +2 +:)> #include <errno.h> #include <iostream> typedef boost::(:link +1 ++ +0 ++ +-43 +2 +:)<struct tag_errno,int> errno_info; //(1) class my_error: public boost::(:link +1 ++ +0 ++ +-42 +2 +:), public std::exception { }; //(2) void f() { throw my_error() << errno_info(errno); //(3) } @] First, we instantiate the (:link +1 ++ +0 ++ +-43 +2 +:) template using a unique identifier -- tag_errno, and the type of the info it identifies -- int. This provides compile-time type safety for the various values stored in exception objects. Second, we define class my_error, which derives from boost::(:link +1 ++ +0 ++ +-42 +2 +:). Finally, (3) illustrates how the typedef from (1) can be used with (:link +1 ++ +0 ++ +-17 +2 +|operator<<:) to store values in exception objects at the point of the throw. The stored errno value can be recovered at a later time like this: [@// ...continued void g() { try { f(); } catch( my_error & x ) { if( int const * err=boost::(:link +1 ++ +0 ++ +-36 +2 +:)<errno_info>(x) ) std::cerr << "Error code: " << *err; } }@] The (:link +1 ++ +0 ++ +-36 +2 +:) 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, err will point to it; otherwise a null pointer is returned. ++ ++ +0 ++ +-46 ++ +1 +2 +(:auto !!:) (:pagelist fmt="index" tags="type":) ++ + +0 ++ +-47 ++ +11 +2 +(:auto !!!:) Here is how cloning can be enabled in a throw-expression (15.1): [@#include <(:link +1 ++ +0 ++ +-56 +2 +:)> #include <stdio.h> #include <errno.h> typedef boost::error_info<struct tag_errno,int> errno_info; class file_read_error: public boost::(:link +1 ++ +0 ++ +-42 +2 +:) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw boost::(:link +1 ++ +0 ++ +-25 +2 +:)(file_read_error()) << errno_info(errno); }@] Of course, (:link +1 ++ +0 ++ +-25 +2 +:) may be used with any exception type; there is no requirement that it should derive from boost::(:link +1 ++ +0 ++ +-42 +2 +:). +0 @@ -8632,7 +8632,7 @@0 - -42 +-43 2 @@ -8809,9 +8809,7 @@- 1 -2 -!!!!Throws: std::bad_alloc, or any exception emitted by T1..TN copy constructor. +0 @@ -8833,7 +8831,9 @@ - 0 +1 +2 +!!!!Throws: Any exception emitted by v's copy constructor. @@ -8844,7 +8844,9 @@ - 0 +1 +2 +!!!!Throws: std::bad_alloc, or any exception emitted by T1..TN copy constructor. @@ -8855,9 +8857,7 @@ - 1 -2 -!!!!Throws: Any exception emitted by v's copy constructor. +0 @@ -8901,9 +8901,7 @@ - 1 -2 -!!!!Throws: std::bad_alloc, or any exception emitted by the T copy constructor. +0 @@ -8925,7 +8923,9 @@ - 0 +1 +2 +!!!!Throws: std::bad_alloc, or any exception emitted by the T copy constructor. @@ -9423,18 +9423,7 @@ - 3 -2 -`#include <(:link -1 -- -0 -- --31 -2 -:)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] +0 @@ -9452,11 +9441,11 @@ 0 - -57 +-32 2 -:)> [@namespace boost { (:include decl pre_indent="4":) }@] +:)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] @@ -9466,37 +9455,6 @@ --7 -- -5 -2 -`#include <(:link -1 -- -0 -- --49 -2 -:)> [@namespace boost { (:include -1 -- -0 -- --7 -2 -decl pre_indent="4":) }@] -- -- 0 -- --8 -@@ -9505,20 +9463,7 @@ 0 - 0 - --9 -- -1 -2 -[@namespace boost { (:include api pre_indent="4":) }@] -- +- 0 -- -10 +-8 @@ -9540,7 +9485,7 @@ 0 - -11 +-9 @@ -9562,7 +9507,38 @@ + 0 - +-12 +-10 ++ +5 +2 +`#include <(:link +1 ++ +0 ++ +-49 +2 +:)> [@namespace boost { (:include +1 ++ +0 ++ +-10 +2 +decl pre_indent="4":) }@] ++ ++ 0 ++ -11 @@ -9573,13 +9549,35 @@ 0 - -13 +-12 + 1 2 -[@#include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] +[@namespace boost { (:include api pre_indent="4":) }@] ++ + +0 ++ +-13 ++ 3 +2 +`#include <(:link +1 ++ +0 ++ +-57 +2 +:)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -9601,18 +9599,9 @@ - 3 +1 2 -`#include <(:link -1 -- -0 -- --56 -2 -:)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] +[@#include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] @@ -9634,7 +9623,18 @@ - 0 +3 +2 +`#include <(:link +1 ++ +0 ++ +-56 +2 +:)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] @@ -9655,6 +9655,28 @@ +-19 ++ +0 ++ ++ +0 ++ +-20 ++ +0 ++ -+ 0 ++ +-21 +3 2 @@ -9674,7 +9696,7 @@0 - -20 +-22 @@ -9692,28 +9714,6 @@ :)> [@namespace boost { (:include decl pre_indent="4":) }@] - -- -0 -- --21 -- -0 -- - -0 -- --22 -- -0 -+ + 0 @@ -9732,6 +9732,17 @@-24 + +0 ++ -+ 0 ++ +-25 +3 2 @@ -9751,7 +9762,7 @@0 - -25 +-26 @@ -9769,17 +9780,6 @@ > (:include decl:) - - -0 -- --26 -- -0 -0 @@ -9795,7 +9795,7 @@0 - -9 +-12 2 @@ -9817,7 +9817,7 @@0 - -31 +-32 2 @@ -9832,9 +9832,7 @@- 1 -2 -[@namespace boost { (:include decl pre_indent="4":) }@] +0 @@ -9844,6 +9842,28 @@ +-30 ++ +3 +2 +`#include < +1 ++ +0 ++ +-60 +2 +> [@namespace boost { (:include decl pre_indent="4":) }@] ++ -+ 0 ++ +-31 +3 2 @@ -9863,7 +9883,7 @@0 - -31 +-32 @@ -9874,24 +9894,13 @@ 0 - -41 +-42 2 decl pre_indent="4":) (:include api pre_indent="4":) }@] - - -0 -- --32 -- -0 -+ + 0 @@ -9910,6 +9919,17 @@-34 + +0 ++ -+ 0 ++ +-35 +3 2 @@ -9929,7 +9949,7 @@0 - -35 +-36 @@ -9938,17 +9958,6 @@ [@namespace boost { (:include decl pre_indent="4":) }@] - - -0 -- --36 -- -0 -+ + 0 @@ -9967,6 +9976,17 @@-38 + +0 ++ -+ 0 ++ +-39 +3 2 @@ -9986,7 +10006,7 @@0 - -39 +-40 @@ -10004,17 +10024,6 @@ :)> [@namespace boost { (:include decl pre_indent="4":) }@] - - -0 -- --40 -- -0 -0 @@ -10023,18 +10032,7 @@- 3 -2 -`#include <(:link -1 -- -0 -- --9 -2 -:)> [@namespace boost { (:include def pre_indent="4":) }@] +0 @@ -10052,7 +10050,7 @@ 0 - -56 +-12 2 @@ -10067,7 +10065,18 @@- 0 +3 +2 +`#include <(:link +1 ++ +0 ++ +-56 +2 +:)> [@namespace boost { (:include def pre_indent="4":) }@] @@ -10197,7 +10206,7 @@ -0 - -9 +-12 2 @@ -10254,7 +10263,7 @@0 - -9 +-12 2 @@ -10276,7 +10285,7 @@0 - -9 +-12 2 @@ -10511,23 +10520,6 @@@@ -11883,20 +11892,11 @@ 56 -- - -- -- -0 -- -- -1 -- --36 -+ @@ -10559,7 +10551,24 @@ - +-8 +-38 ++ + ++ ++ +0 ++ ++ +1 ++ -11 @@ -10613,6 +10622,57 @@ +-27 + ++ ++ ++ +0 ++ ++ +1 ++ +-18 ++ ++ ++ ++ +0 ++ ++ +1 ++ +-41 ++ + ++ ++ +0 ++ ++ +1 ++ +-19 +- @@ -10630,57 +10690,6 @@ -16 - -- -- -- -0 -- -- -1 -- --40 -- -- -- -- -0 -- -- -1 -- --17 -- - -- -- -0 -- -- -1 -- --14 -@@ -10729,7 +10738,7 @@ - -45 +-46 @@ -10763,7 +10772,7 @@ - -47 +-34 @@ -10787,7 +10796,7 @@ - -22 +-7 @@ -10811,7 +10820,7 @@ - -32 +-33 @@ -10835,7 +10844,7 @@ - -18 +-20 @@ -10863,7 +10872,7 @@ - -29 +-30 @@ -10891,7 +10900,7 @@ - -34 +-35 @@ -10919,7 +10928,7 @@ - -6 +-8 @@ -10947,7 +10956,7 @@ - -20 +-22 @@ -10975,7 +10984,7 @@ - -39 +-40 @@ -11003,7 +11012,7 @@ - -10 +-13 @@ -11031,7 +11040,7 @@ - -35 +-36 @@ -11055,7 +11064,7 @@ - -12 +-14 @@ -11107,7 +11116,7 @@ - -11 +-9 @@ -11135,7 +11144,7 @@ - -15 +-17 @@ -11159,7 +11168,7 @@ - -44 +-45 @@ -11235,7 +11244,7 @@ - -38 +-39 @@ -11267,7 +11276,7 @@ - -23 +-5 @@ -11319,7 +11328,7 @@ - -42 +-43 @@ -11383,7 +11392,7 @@ - -30 +-31 @@ -11407,7 +11416,7 @@ - -13 +-15 @@ -11435,7 +11444,7 @@ - -5 +-6 @@ -11511,7 +11520,7 @@ - -9 +-12 @@ -11539,7 +11548,7 @@ - -26 +-23 @@ -11567,7 +11576,7 @@ - -24 +-25 @@ -11595,7 +11604,7 @@ - -19 +-21 @@ -11623,7 +11632,7 @@ - -41 +-42 @@ -11655,7 +11664,7 @@ - -43 +-44 @@ -11703,7 +11712,7 @@ - -46 +-47 @@ -11727,7 +11736,7 @@ - -25 +-26 @@ -11751,7 +11760,7 @@ - -33 +-29 @@ -11775,7 +11784,7 @@ - -31 +-32 @@ -11831,7 +11840,7 @@ - -7 +-10 @@ -11855,7 +11864,7 @@ - -21 +-24 0 - -5 +-6 diagnostic_information free function - - -0 -- --6 -exception_ptr free function -- 0 @@ -11904,7 +11904,7 @@-7 error_info free function +noindex tutorial @@ -11913,7 +11913,7 @@ --8 tutorial +exception_ptr free function @@ -11922,7 +11922,7 @@ --9 + function member @@ -11931,7 +11931,7 @@ --10 exception_ptr free function +error_info free function @@ -11940,7 +11940,7 @@ --11 function member +tutorial @@ -11949,7 +11949,7 @@ --12 diagnostic_information tutorial ++ @@ -11958,7 +11958,16 @@ --13 error_info +exception_ptr free function ++ + +0 ++ +-14 +diagnostic_information tutorial @@ -11967,22 +11976,13 @@ --15 error_info free function +error_info - - 0 - --18 -tutorial -- - 0 -- -19 +-17 error_info free function @@ -11994,7 +11994,7 @@-20 -type +tutorial @@ -12003,7 +12003,7 @@ --21 noalso noindex tutorial +error_info free function + @@ -12012,7 +12012,16 @@ --22 noindex tutorial +type ++ + +0 ++ +-23 +function @@ -12021,7 +12030,7 @@ --24 exception_ptr free function +noalso noindex tutorial @@ -12030,7 +12039,7 @@ --25 macro +exception_ptr free function @@ -12039,7 +12048,7 @@ --26 function +macro @@ -12066,7 +12075,7 @@ --29 function +noalso noindex tutorial @@ -12075,7 +12084,7 @@ --30 function member +function + @@ -12084,26 +12093,17 @@ +-31 function member ++ -+ 0 ++ +-32 +- -- -0 -- --33 -noalso noindex tutorial -- - -0 -- --34 -exception_ptr type -- 0 @@ -12111,7 +12111,7 @@-35 error_info free function +exception_ptr type @@ -12120,7 +12120,7 @@ --36 noindex +error_info free function @@ -12129,7 +12129,7 @@ --37 tutorial +noindex @@ -12138,7 +12138,7 @@ --38 free function +tutorial @@ -12147,7 +12147,7 @@ --39 exception_ptr free function +free function @@ -12156,7 +12156,7 @@ --40 tutorial +exception_ptr free function @@ -12165,7 +12165,7 @@ --41 type +tutorial @@ -12183,7 +12183,7 @@ --43 function +type + @@ -12192,13 +12192,22 @@ +-44 function ++ + 0 ++ +-45 +noalso noindex tutorial 0 - -46 +-47 noindex tutorial