From c50fd487fe6e0b1d748acc27a05b8ac71943cec0 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Sun, 31 Aug 2008 19:10:32 +0000 Subject: [PATCH] documentation bug [SVN r48498] --- doc/boost-exception.html | 10 +- doc/copy_exception.html | 10 +- doc/enable_current_exception.html | 1 + doc/source/boost-exception.reno | 6065 +++++++++++++++-------------- 4 files changed, 3056 insertions(+), 3030 deletions(-) diff --git a/doc/boost-exception.html b/doc/boost-exception.html index 8dd5059..26684fc 100644 --- a/doc/boost-exception.html +++ b/doc/boost-exception.html @@ -395,7 +395,15 @@ boost exception_ptr copy_exception( T const & e ); }

Effects:

-

As if try { throw e; } catch( ... ) { return current_exception(); }

+

As if

+
try
+    {
+    throw enable_current_exception(e);
+    }
+catch(...)
+    {
+    return current_exception();
+    }

rethrow_exception

#include <boost/exception_ptr.hpp>

diff --git a/doc/copy_exception.html b/doc/copy_exception.html index ff6f4ea..e67d398 100644 --- a/doc/copy_exception.html +++ b/doc/copy_exception.html @@ -29,7 +29,15 @@ boost exception_ptr copy_exception( T const & e ); }

Effects:

-

As if try { throw e; } catch( ... ) { return current_exception(); }

+

As if

+
try
+    {
+    throw enable_current_exception(e);
+    }
+catch(...)
+    {
+    return current_exception();
+    }

See Also:

Boost Exception
diff --git a/doc/enable_current_exception.html b/doc/enable_current_exception.html index fa3bf02..4bfe80e 100644 --- a/doc/enable_current_exception.html +++ b/doc/enable_current_exception.html @@ -49,6 +49,7 @@ throw boost::
enab

See Also:

Boost Exception
boost/exception/exception.hpp
+
copy_exception
current_exception
Transporting of Exceptions Between Threads
throw_exception
diff --git a/doc/source/boost-exception.reno b/doc/source/boost-exception.reno index 509f066..449c719 100644 --- a/doc/source/boost-exception.reno +++ b/doc/source/boost-exception.reno @@ -48,93 +48,6 @@ reno_context - - - - - - 0 - - - - - - 1 - - - - - <string>transporting of arbitrary data to the catch site</string> - - - tutorial_transporting_data - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 6 - - reno_context - - - - - - - 2 - 5D77D35C34EE3A1CF65AF8A54984D895F7FD5E5F61B51F1C00141EE26184826F - 2896829895 - 4094 - 775 - CF9032A2CB14D66F0F004C0AFDE2BB94321F405D6D95AC46EC5350AB4843A4F1 - 1073329133 - 715 - 243 - - - - - - 0 - ../../../../boost/exception/info.hpp - 0 - 0 - - - - - <string>error_info</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 7 - - reno_context - @@ -176,6 +89,93 @@ (:include include:) ---- !!!See Also: (:pagelist link="backlink" except_tags="exception,member" mod="w":) + + + 0 + + 6 + + reno_context + + + + + + + 2 + F7633FDCF6615C0199645701EE6E7ACE5CBCD7A7CF6838573791E91ABB3C09F2 + 1668435395 + 1332 + 396 + A1F443AF571973A12005D2F7D4AE09A32AAF686FEEAE272EC21512A65EB943E8 + 3879093659 + 1300 + 26 + + + + + + 0 + ../../../../boost/exception/info_tuple.hpp + 0 + 0 + + + + + <string>operator<</tuple</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 7 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>transporting of arbitrary data to the catch site</string> + + + tutorial_transporting_data + + + + + + 1 + 2 + (:include include:) (:auto also:) + + 0 @@ -189,28 +189,32 @@ - 1 - EB34EBE3F1C68865DE1F02FD88687E670BAE694282DAC893A537F30DDCD57FA3 - 3701809375 - 11225 - 323 + 2 + 5D77D35C34EE3A1CF65AF8A54984D895F7FD5E5F61B51F1C00141EE26184826F + 2896829895 + 4094 + 775 + CF9032A2CB14D66F0F004C0AFDE2BB94321F405D6D95AC46EC5350AB4843A4F1 + 1073329133 + 715 + 243 0 - ../../../../boost/exception_ptr.hpp + ../../../../boost/exception/info.hpp 0 0 - <string>boost/exception_ptr.hpp</string> + <string>error_info</string> - exception_cloning_hpp + @@ -272,6 +276,145 @@ reno_context + + + + + + 2 + 316E7826A34AB7412F671B91F1115D9000953DA08C941AF99D28140ECDEEB6A6 + 718983169 + 1570 + 504 + FF9587851F54F772BCD4A548BC28D9CEB5FA00C61CBFC064568FD4F1E19AEC33 + 535614227 + 676 + 888 + + + + + + 0 + ../../../../boost/exception/get_error_info.hpp + 0 + 0 + + + + + <string>get_error_info</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 11 + + reno_context + + + + + + + 1 + EB34EBE3F1C68865DE1F02FD88687E670BAE694282DAC893A537F30DDCD57FA3 + 3701809375 + 11225 + 323 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>boost/exception_ptr.hpp</string> + + + exception_cloning_hpp + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 12 + + reno_context + + + + + + + 1 + D9B8E6AA12A4F33953B1A961FA590C5A3840234B6531CA8C04AC985AD5800835 + 2432554768 + 702 + 408 + + + + + + 0 + ../../example/enable_error_info.cpp + 0 + 0 + + + + + <string>integrating boost exception in existing exception class hierarchies</string> + + + tutorial_enable_error_info + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 13 + + reno_context + @@ -321,7 +464,7 @@ 0 - 11 + 14 reno_context @@ -370,7 +513,7 @@ 0 - 12 + 15 reno_context @@ -413,7 +556,7 @@ 0 - 13 + 16 reno_context @@ -458,7 +601,7 @@ 0 - 14 + 17 reno_context @@ -501,7 +644,7 @@ 0 - 15 + 18 reno_context @@ -510,47 +653,41 @@ - 2 - F7633FDCF6615C0199645701EE6E7ACE5CBCD7A7CF6838573791E91ABB3C09F2 - 1668435395 - 1332 - 396 - A1F443AF571973A12005D2F7D4AE09A32AAF686FEEAE272EC21512A65EB943E8 - 3879093659 - 1300 - 26 + 1 + FC684D0DD5A9732B4130F2AB3DB6E0491D0F523E14B7FB738B2019EA2C7F8717 + 2229778754 + 631 + 319 0 - ../../../../boost/exception/info_tuple.hpp + ../../example/cloning_2.cpp 0 0 - <string>operator<</tuple</string> + <string>cloning and re-throwing an exception</string> - + cloning_and_rethrowing - 1 - 2 - (:include include:) (:auto also:) + 0 0 - 16 + 19 reno_context @@ -603,7 +740,7 @@ 0 - 17 + 20 reno_context @@ -652,52 +789,7 @@ 0 - 18 - - reno_context - - - - - - - 1 - D9B8E6AA12A4F33953B1A961FA590C5A3840234B6531CA8C04AC985AD5800835 - 2432554768 - 702 - 408 - - - - - - 0 - ../../example/enable_error_info.cpp - 0 - 0 - - - - - <string>integrating boost exception in existing exception class hierarchies</string> - - - tutorial_enable_error_info - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 19 + 21 reno_context @@ -746,7 +838,56 @@ 0 - 20 + 22 + + reno_context + + + + + + + 2 + 78F37A2801CADB066084578244BC93958EAD33507F30C07353EA7D161FFBF973 + 2089604779 + 11016 + 532 + 7890935423C731BD8E7DE2820DF7E85C72126B2EAB9A45B0AAFA5749DD1A9D57 + 2497085175 + 2528 + 8066 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>current_exception</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 23 reno_context @@ -795,7 +936,7 @@ 0 - 21 + 24 reno_context @@ -831,7 +972,7 @@ 0 - 22 + 25 reno_context @@ -865,7 +1006,7 @@ 0 - 23 + 26 reno_context @@ -910,7 +1051,7 @@ 0 - -5 + -7 2 @@ -919,7 +1060,7 @@ 0 - -18 + -12 2 @@ -928,7 +1069,7 @@ 0 - -22 + -25 2 @@ -937,7 +1078,7 @@ 0 - 24 + 27 reno_context @@ -978,12 +1119,30 @@ 0 - -7 + -5 2 :) ##Transporting of Arbitrary Data to the Catch Site ###(:link 1 + + 0 + + -8 + + + 2 + :) ###(:link + 1 + + 0 + + -14 + + + 2 + :) ###(:link + 1 0 @@ -996,7 +1155,7 @@ 0 - -11 + -10 2 @@ -1005,61 +1164,7 @@ 0 - -15 - - - 2 - :) ###(:link - 1 - - 0 - - 25 - - reno_context - - - - - - - 2 - 316E7826A34AB7412F671B91F1115D9000953DA08C941AF99D28140ECDEEB6A6 - 718983169 - 1570 - 504 - FF9587851F54F772BCD4A548BC28D9CEB5FA00C61CBFC064568FD4F1E19AEC33 - 535614227 - 676 - 888 - - - - - - 0 - ../../../../boost/exception/get_error_info.hpp - 0 - 0 - - - - - <string>get_error_info</string> - - - - - - - - 2 - :) ###(:link - 1 - - 0 - - 26 + 28 reno_context @@ -1104,7 +1209,7 @@ 0 - 27 + 29 reno_context @@ -1145,7 +1250,7 @@ 0 - -19 + -21 2 @@ -1154,7 +1259,7 @@ 0 - -20 + -23 2 @@ -1163,43 +1268,7 @@ 0 - 28 - - reno_context - - - - - - - 2 - 78F37A2801CADB066084578244BC93958EAD33507F30C07353EA7D161FFBF973 - 2089604779 - 11016 - 532 - 7890935423C731BD8E7DE2820DF7E85C72126B2EAB9A45B0AAFA5749DD1A9D57 - 2497085175 - 2528 - 8066 - - - - - - 0 - ../../../../boost/exception_ptr.hpp - 0 - 0 - - - - - <string>current_exception</string> - - - - - + -22 2 @@ -1208,7 +1277,7 @@ 0 - 29 + 30 reno_context @@ -1253,7 +1322,7 @@ 0 - 30 + 31 reno_context @@ -1298,7 +1367,7 @@ 0 - -17 + -20 2 @@ -1307,7 +1376,7 @@ 0 - 31 + 32 reno_context @@ -1352,7 +1421,7 @@ 0 - -23 + -26 2 @@ -1361,7 +1430,7 @@ 0 - 32 + 33 reno_context @@ -1402,7 +1471,7 @@ 0 - 33 + 34 reno_context @@ -1443,7 +1512,7 @@ 0 - 34 + 35 reno_context @@ -1488,7 +1557,7 @@ 0 - 35 + 36 reno_context @@ -1529,7 +1598,7 @@ 0 - 36 + 37 reno_context @@ -1570,7 +1639,7 @@ 0 - 37 + 38 reno_context @@ -1611,7 +1680,7 @@ 0 - -13 + -16 2 @@ -1620,7 +1689,7 @@ 0 - -8 + -11 2 @@ -1629,7 +1698,7 @@ 0 - 38 + 39 reno_context @@ -1670,7 +1739,7 @@ 0 - 39 + 40 reno_context @@ -1704,7 +1773,7 @@ 0 - -32 + -33 2 @@ -1713,43 +1782,7 @@ 0 - -35 - - - 2 - api pre_indent="4":) (:include - 1 - - 0 - - -37 - - - 2 - api pre_indent="4":) (:include - 1 - - 0 - - -13 - - - 2 - api pre_indent="4":) (:include - 1 - - 0 - - -33 - - - 2 - api pre_indent="4":) (:include - 1 - - 0 - - -8 + -36 2 @@ -1762,17 +1795,71 @@ 2 + api pre_indent="4":) (:include + 1 + + 0 + + -16 + + + 2 + api pre_indent="4":) (:include + 1 + + 0 + + -34 + + + 2 + api pre_indent="4":) (:include + 1 + + 0 + + -11 + + + 2 + api pre_indent="4":) (:include + 1 + + 0 + + -39 + + + 2 api pre_indent="4":) }@] !!Class exception (:include 1 0 - -7 + -5 2 :) !!Transporting of Arbitrary Data to the Catch Site (:include 1 + + 0 + + -8 + + + 2 + :) (:include + 1 + + 0 + + -14 + + + 2 + :) (:include + 1 0 @@ -1785,61 +1872,7 @@ 0 - -11 - - - 2 - :) (:include - 1 - - 0 - - -15 - - - 2 - :) (:include - 1 - - 0 - - -25 - - - 2 - :) (:include - 1 - - 0 - - -26 - - - 2 - :) (:include - 1 - - 0 - - -27 - - - 2 - :) !!Transporting of Exceptions between Threads (:include - 1 - - 0 - - -19 - - - 2 - :) (:include - 1 - - 0 - - -20 + -10 2 @@ -1861,6 +1894,33 @@ 2 + :) !!Transporting of Exceptions between Threads (:include + 1 + + 0 + + -21 + + + 2 + :) (:include + 1 + + 0 + + -23 + + + 2 + :) (:include + 1 + + 0 + + -22 + + + 2 :) (:include 1 @@ -1875,7 +1935,16 @@ 0 - -17 + -31 + + + 2 + :) (:include + 1 + + 0 + + -20 2 @@ -1884,7 +1953,7 @@ 0 - -31 + -32 2 @@ -1893,65 +1962,13 @@ 0 - -23 + -26 2 :) !!Acknowledgements Peter Dimov has been continuously influencing the design and evolution of Boost Exception. Also thanks to Tobias Schwinger, Tom Brinkman, Pavel Vozenilek and everyone who participated in the review process. - - - 0 - - -22 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -23 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -29 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -24 - - - - 1 - 2 - (:include include:) (:auto also:) - - 0 @@ -1978,19 +1995,6 @@ (:include include:) (:auto also:) - - - 0 - - -27 - - - - 1 - 2 - (:include include:) (:auto also:) - - 0 @@ -2008,7 +2012,176 @@ 0 - 40 + -27 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -35 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -28 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -29 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -31 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -32 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -34 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -33 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -36 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -37 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -38 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -39 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -40 + + + + 1 + 2 + (:auto !:) (:pagelist fmt="index" except_tags="index,noindex" mod="w":) + + + + + 0 + + 41 reno_context @@ -2057,137 +2230,7 @@ 0 - -28 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -31 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -33 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -32 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -34 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -35 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -36 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -37 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -38 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -39 - - - - 1 - 2 - (:auto !:) (:pagelist fmt="index" except_tags="index,noindex" mod="w":) - - - - - 0 - - 41 + 42 reno_context @@ -2226,49 +2269,6 @@ 0 - - - 0 - - 42 - - reno_context - - - - - - - 1 - FC684D0DD5A9732B4130F2AB3DB6E0491D0F523E14B7FB738B2019EA2C7F8717 - 2229778754 - 631 - 319 - - - - - - 0 - ../../example/cloning_2.cpp - 0 - 0 - - - - - <string>cloning and re-throwing an exception</string> - - - cloning_and_rethrowing - - - - - - 0 - - @@ -2290,39 +2290,6 @@ -5 - - 0 - - - - - 0 - - -6 - - - - 3 - 2 - [@template <class Tag,class T> class (:link - 1 - - 0 - - -6 - - - 2 - :) { public: typedef T value_type; error_info( value_type const & ); };@] - - - - - 0 - - -7 - - 9 2 @@ -2331,7 +2298,7 @@ 0 - -7 + -5 2 @@ -2340,7 +2307,7 @@ 0 - -16 + -19 2 @@ -2349,7 +2316,7 @@ 0 - -10 + -13 2 @@ -2358,7 +2325,7 @@ 0 - -40 + -41 2 @@ -2369,13 +2336,46 @@ 0 - -8 + -6 0 + + + 0 + + -7 + + + + 0 + + + + + 0 + + -8 + + + + 3 + 2 + [@template <class Tag,class T> class (:link + 1 + + 0 + + -8 + + + 2 + :) { public: typedef T value_type; error_info( value_type const & ); };@] + + 0 @@ -2541,17 +2541,6 @@ 0 - - - 0 - - -29 - - - - 0 - - 0 @@ -2585,17 +2574,6 @@ 0 - - - 0 - - -27 - - - - 0 - - 0 @@ -2611,7 +2589,18 @@ 0 - -40 + -27 + + + + 0 + + + + + 0 + + -35 @@ -2633,7 +2622,7 @@ 0 - -31 + -29 @@ -2644,7 +2633,7 @@ 0 - -33 + -31 @@ -2677,7 +2666,7 @@ 0 - -35 + -33 @@ -2728,6 +2717,17 @@ 0 + + + 0 + + -40 + + + + 0 + + 0 @@ -2805,54 +2805,7 @@ - 11 - 2 - [@(:include - 1 - - 0 - - -17 - - - 2 - decl:) (:include - 1 - - 0 - - -19 - - - 2 - decl:) (:include - 1 - - 0 - - -29 - - - 2 - decl:) (:include - 1 - - 0 - - -28 - - - 2 - decl:) (:include - 1 - - 0 - - -30 - - - 2 - decl:)@] + 0 @@ -2885,7 +2838,54 @@ - 0 + 11 + 2 + [@(:include + 1 + + 0 + + -20 + + + 2 + decl:) (:include + 1 + + 0 + + -21 + + + 2 + decl:) (:include + 1 + + 0 + + -30 + + + 2 + decl:) (:include + 1 + + 0 + + -22 + + + 2 + decl:) (:include + 1 + + 0 + + -31 + + + 2 + decl:)@] @@ -2907,18 +2907,7 @@ - 3 - 2 - [@(:include - 1 - - 0 - - -15 - - - 2 - decl:)@] + 0 @@ -2951,7 +2940,18 @@ - 0 + 3 + 2 + [@(:include + 1 + + 0 + + -6 + + + 2 + decl:)@] @@ -3031,17 +3031,6 @@ 0 - - - 0 - - -29 - - - - 0 - - 0 @@ -3075,17 +3064,6 @@ 0 - - - 0 - - -27 - - - - 0 - - 0 @@ -3101,13 +3079,35 @@ 0 - -40 + -27 0 + + + 0 + + -35 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -8 + + + 2 + decl:)@] + + 0 @@ -3119,6 +3119,17 @@ 0 + + + 0 + + -29 + + + + 0 + + 0 @@ -3134,7 +3145,18 @@ 0 - -33 + -32 + + + + 0 + + + + + 0 + + -34 @@ -3145,7 +3167,7 @@ 0 - -31 + -32 2 @@ -3156,7 +3178,7 @@ 0 - -32 + -33 @@ -3164,15 +3186,6 @@ 2 [@#include <(:link 1 - - 0 - - -33 - - - 2 - :)> #include <(:link - 1 0 @@ -3209,24 +3222,6 @@ 2 :)> #include <(:link 1 - - 0 - - -13 - - - 2 - :)> #include <(:link - 1 - - 0 - - -8 - - - 2 - :)> #include <(:link - 1 0 @@ -3234,71 +3229,36 @@ 2 + :)> #include <(:link + 1 + + 0 + + -16 + + + 2 + :)> #include <(:link + 1 + + 0 + + -11 + + + 2 + :)> #include <(:link + 1 + + 0 + + -39 + + + 2 :)>@] - - - 0 - - -34 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -6 - - - 2 - decl:)@] - - - - - 0 - - -35 - - - - 7 - 2 - [@(:include - 1 - - 0 - - -7 - - - 2 - def:) (:include - 1 - - 0 - - -26 - - - 2 - decl:) (:include - 1 - - 0 - - -20 - - - 2 - decl:)@] - - 0 @@ -3306,28 +3266,6 @@ -36 - - 3 - 2 - [@(:include - 1 - - 0 - - -25 - - - 2 - decl:)@] - - - - - 0 - - -37 - - 7 2 @@ -3336,7 +3274,7 @@ 0 - -6 + -5 2 @@ -3345,34 +3283,12 @@ 0 - -27 + -28 2 decl:) (:include 1 - - 0 - - -11 - - - 2 - decl:)@] - - - - - 0 - - -38 - - - - 3 - 2 - [@(:include - 1 0 @@ -3383,6 +3299,68 @@ decl:)@] + + + 0 + + -37 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -10 + + + 2 + decl:)@] + + + + + 0 + + -38 + + + + 7 + 2 + [@(:include + 1 + + 0 + + -8 + + + 2 + def:) (:include + 1 + + 0 + + -29 + + + 2 + decl:) (:include + 1 + + 0 + + -14 + + + 2 + decl:)@] + + 0 @@ -3390,6 +3368,28 @@ -39 + + 3 + 2 + [@(:include + 1 + + 0 + + -26 + + + 2 + decl:)@] + + + + + 0 + + -40 + + 0 @@ -3437,39 +3437,6 @@ -5 - - 0 - - - - - 0 - - -6 - - - - 3 - 2 - [@template <class Tag,class T> class (:link - 1 - - 0 - - -6 - - - 2 - :);@] - - - - - 0 - - -7 - - 3 2 @@ -3478,7 +3445,7 @@ 0 - -7 + -5 2 @@ -3489,13 +3456,75 @@ 0 - -8 + -6 + + + + 7 + 2 + [@template <class E, class Tag1, class T1, ..., class TagN, class TN> E const & (:link + 1 + + 0 + + -6 + + + 2 + |operator<<:)( E const & x, (:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)< (:link + 1 + + 0 + + -8 + + + 2 + :)<Tag1,T1>, ..., (:link + 1 + + 0 + + -8 + + + 2 + :)<TagN,TN> > const & v );@] + + + + + 0 + + -7 0 + + + 0 + + -8 + + + + 3 + 2 + [@template <class Tag,class T> class (:link + 1 + + 0 + + -8 + + + 2 + :);@] + + 0 @@ -3515,9 +3544,9 @@ - 7 + 3 2 - [@(:link + [@template <class ErrorInfo,class E> (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:)<typename ErrorInfo::value_type const> (:link 1 0 @@ -3526,25 +3555,7 @@ 2 - mod="m":)(); (:link - 1 - - 0 - - -10 - - - 2 - mod="m":)( (:link - 1 - - 0 - - -7 - - - 2 - :) const & x );@] + :)( E const & x );@] @@ -3555,27 +3566,7 @@ - 5 - 2 - [@template <class E, class Tag, class T> E const & (:link - 1 - - 0 - - -11 - - - 2 - |operator<<:)( E const & x, (:link - 1 - - 0 - - -6 - - - 2 - :)<Tag,T> const & v );@] + 0 @@ -3597,7 +3588,36 @@ - 0 + 7 + 2 + [@(:link + 1 + + 0 + + -13 + + + 2 + mod="m":)(); (:link + 1 + + 0 + + -13 + + + 2 + mod="m":)( (:link + 1 + + 0 + + -5 + + + 2 + :) const & x );@] @@ -3608,7 +3628,27 @@ - 0 + 5 + 2 + [@template <class E, class Tag, class T> E const & (:link + 1 + + 0 + + -14 + + + 2 + |operator<<:)( E const & x, (:link + 1 + + 0 + + -8 + + + 2 + :)<Tag,T> const & v );@] @@ -3619,36 +3659,7 @@ - 7 - 2 - [@template <class E, class Tag1, class T1, ..., class TagN, class TN> E const & (:link - 1 - - 0 - - -15 - - - 2 - |operator<<:)( E const & x, (:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)< (:link - 1 - - 0 - - -6 - - - 2 - :)<Tag1,T1>, ..., (:link - 1 - - 0 - - -6 - - - 2 - :)<TagN,TN> > const & v );@] + 0 @@ -3659,18 +3670,7 @@ - 3 - 2 - [@virtual char const * (:link - 1 - - 0 - - -16 - - - 2 - mod="m":)() const throw();@] + 0 @@ -3681,27 +3681,7 @@ - 5 - 2 - [@class (:link - 1 - - 0 - - -17 - - - 2 - :): public std::exception public boost:: - 1 - - 0 - - -7 - - - 2 - { ---unspecified--- };@] + 0 @@ -3725,7 +3705,7 @@ 3 2 - [@typedef ---unspecified--- (:link + [@virtual char const * (:link 1 0 @@ -3734,7 +3714,7 @@ 2 - :);@] + mod="m":)() const throw();@] @@ -3745,9 +3725,9 @@ - 3 + 5 2 - [@template <class T> ---unspecified--- (:link + [@class (:link 1 0 @@ -3756,7 +3736,16 @@ 2 - :)( T const & e );@] + :): public std::exception public boost:: + 1 + + 0 + + -5 + + + 2 + { ---unspecified--- };@] @@ -3767,7 +3756,18 @@ - 0 + 3 + 2 + [@typedef ---unspecified--- (:link + 1 + + 0 + + -21 + + + 2 + :);@] @@ -3778,7 +3778,27 @@ - 0 + 5 + 2 + [@(:link + 1 + + 0 + + -21 + + + 2 + :) (:link + 1 + + 0 + + -22 + + + 2 + :)();@] @@ -3789,9 +3809,9 @@ - 5 + 3 2 - [@#ifdef BOOST_NO_EXCEPTIONS void (:link + [@template <class T> ---unspecified--- (:link 1 0 @@ -3800,46 +3820,6 @@ 2 - :)( std::exception const & e ); // user defined #else template <class E> void (:link - 1 - - 0 - - -23 - - - 2 - :)( E const & e ); #endif@] - - - - - 0 - - -29 - - - - 5 - 2 - [@template <class T> (:link - 1 - - 0 - - -19 - - - 2 - :) (:link - 1 - - 0 - - -29 - - - 2 :)( T const & e );@] @@ -3862,18 +3842,7 @@ - 3 - 2 - [@template <class ErrorInfo,class E> (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:)<typename ErrorInfo::value_type const> (:link - 1 - - 0 - - -25 - - - 2 - :)( E const & x );@] + 0 @@ -3884,9 +3853,9 @@ - 3 + 5 2 - [@template <class T> ---unspecified--- (:link + [@#ifdef BOOST_NO_EXCEPTIONS void (:link 1 0 @@ -3895,56 +3864,16 @@ 2 - :)( T const & x );@] - - - - - 0 - - -27 - - - - 9 - 2 - [@typedef (:link + :)( std::exception const & e ); // user defined #else template <class E> void (:link 1 0 - -6 + -26 2 - :)<struct tag_throw_function,char const *> throw_function; typedef (:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_throw_file,char const *> throw_file; typedef (:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_throw_line,int> throw_line; #define (:link - 1 - - 0 - - -27 - - - 2 - :)\ ::boost::throw_function(BOOST_CURRENT_FUNCTION) <<\ ::boost::throw_file(__FILE__) <<\ ::boost::throw_line((int)__LINE__)@] + :)( E const & e ); #endif@] @@ -3957,7 +3886,16 @@ 5 2 - [@void (:link + [@template <class T> (:link + 1 + + 0 + + -21 + + + 2 + :) (:link 1 0 @@ -3966,38 +3904,29 @@ 2 - :)( (:link - 1 - - 0 - - -19 - - - 2 - :) const & ep ); + :)( T const & e );@] 0 - -40 + -27 - 3 - 2 - [@(:link - 1 - - 0 - - -40 - - - 2 - mod="m":)();@] + 0 + + + + + 0 + + -35 + + + + 0 @@ -4008,18 +3937,9 @@ - 5 + 3 2 - [@(:link - 1 - - 0 - - -19 - - - 2 - :) (:link + [@template <class T> ---unspecified--- (:link 1 0 @@ -4028,28 +3948,6 @@ 2 - :)();@] - - - - - 0 - - -31 - - - - 3 - 2 - [@template <class T> std::string (:link - 1 - - 0 - - -31 - - - 2 :)( T const & x );@] @@ -4057,11 +3955,80 @@ 0 - -33 + -29 - 0 + 9 + 2 + [@typedef (:link + 1 + + 0 + + -8 + + + 2 + :)<struct tag_throw_function,char const *> throw_function; typedef (:link + 1 + + 0 + + -8 + + + 2 + :)<struct tag_throw_file,char const *> throw_file; typedef (:link + 1 + + 0 + + -8 + + + 2 + :)<struct tag_throw_line,int> throw_line; #define (:link + 1 + + 0 + + -29 + + + 2 + :)\ ::boost::throw_function(BOOST_CURRENT_FUNCTION) <<\ ::boost::throw_file(__FILE__) <<\ ::boost::throw_line((int)__LINE__)@] + + + + + 0 + + -31 + + + + 5 + 2 + [@void (:link + 1 + + 0 + + -31 + + + 2 + :)( (:link + 1 + + 0 + + -21 + + + 2 + :) const & ep ); @@ -4072,7 +4039,18 @@ - 0 + 3 + 2 + [@template <class T> std::string (:link + 1 + + 0 + + -32 + + + 2 + :)( T const & x );@] @@ -4090,7 +4068,7 @@ 0 - -35 + -33 @@ -4145,13 +4123,35 @@ 0 - -41 + -40 0 + + + 0 + + -41 + + + + 3 + 2 + [@(:link + 1 + + 0 + + -41 + + + 2 + mod="m":)();@] + + 0 @@ -4185,41 +4185,68 @@ - 11 + 19 2 - (:auto !!:) All exception types that derive from boost::(:link + (:auto !!!:) (:include synopsis:) Class boost::(:link 1 0 - -7 + -5 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. Data can be added to a boost::(:link + :) 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 - -7 + -5 2 - :) at the time of the throw, or at a later time. (:include + :) can store data of arbitrary types, using the (:link 1 0 - -12 + -8 2 - :) (:include + :) wrapper and (:link 1 0 - -9 + -14 + + + 2 + |operator<<:). To retrieve data from a boost::(:link + 1 + + 0 + + -5 + + + 2 + :) object, use the (:link + 1 + + 0 + + -10 + + + 2 + :) function template. (:include + 1 + + 0 + + -13 2 @@ -4232,6 +4259,15 @@ 2 + :) (:include + 1 + + 0 + + -19 + + + 2 :) @@ -4242,573 +4278,6 @@ -6 - - 25 - 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 - - -6 - - - 2 - :)<Tag,T> can be passed to (:link - 1 - - 0 - - -11 - - - 2 - |operator<<:) to be stored in objects of type boost::(:link - 1 - - 0 - - -7 - - - 2 - :). !!!!Note: The header <(:link - 1 - - 0 - - -34 - - - 2 - :)> provides a declaration of the (:link - 1 - - 0 - - -6 - - - 2 - :) template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, like this: [@#include <(:link - 1 - - 0 - - -34 - - - 2 - :)> typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_errno,int> errno_info;@] Of course, to actually add an (:link - 1 - - 0 - - -6 - - - 2 - :) object to (:link - 1 - - 0 - - -7 - - - 2 - mod="p":) using (:link - 1 - - 0 - - -11 - - - 2 - |operator<<:), or to retrieve it using (:link - 1 - - 0 - - -25 - - - 2 - :), you must first #include <(:link - 1 - - 0 - - -37 - - - 2 - :)>. - - - - - 0 - - -7 - - - - 19 - 2 - (:auto !!!:) (:include synopsis:) Class boost::(:link - 1 - - 0 - - -7 - - - 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 - - -7 - - - 2 - :) can store data of arbitrary types, using the (:link - 1 - - 0 - - -6 - - - 2 - :) wrapper and (:link - 1 - - 0 - - -11 - - - 2 - |operator<<:). To retrieve data from a boost::(:link - 1 - - 0 - - -7 - - - 2 - :) object, use the (:link - 1 - - 0 - - -25 - - - 2 - :) function template. (:include - 1 - - 0 - - -10 - - - 2 - :) (:include - 1 - - 0 - - -40 - - - 2 - :) (:include - 1 - - 0 - - -16 - - - 2 - :) - - - - - 0 - - -8 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -9 - - - - 21 - 2 - (:auto !!!:) 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> #include <string> class file_read_error { public: explicit file_read_error( std::string const & fn ): fn_(fn) { }; std::string const & file_name() const { return fn_; } private: std::string fn_; }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error("????"); }@] We have defined an exception class file_read_error which can store a file name, so that when we catch a file_read_error object, we know which file the failure is related to. However, the file_read function does not have the file name at the time of the throw; all it has is a FILE handle. One possible solution is to not use FILE handles directly. We could have our own class file which stores both a FILE handle and a file name, and pass that to file_read. However, this could be problematic if we communicate with 3rd party code that does not use our class file (probably because they have their own similar class.) A better solution is to make class file_read_error derive (possibly indirectly) from boost::(:link - 1 - - 0 - - -7 - - - 2 - :), and free the file_read function from the burden of storing the file name in exceptions it throws: [@#include <(:link - 1 - - 0 - - -32 - - - 2 - :)> #include <stdio.h> #include <errno.h> typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_errno,int> errno_info; class file_read_error: public boost::(:link - 1 - - 0 - - -7 - - - 2 - :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error() << errno_info(errno); }@] If file_read detects a failure, it throws an exception which contains the information that is available at the time, namely the errno. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally: [@#include <(:link - 1 - - 0 - - -32 - - - 2 - :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_file_name,std::string> file_name_info; boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode ); void file_read( FILE * f, void * buffer, size_t size ); void parse_file( char const * file_name ) { boost::shared_ptr<FILE> f = file_open(file_name,"rb"); assert(f); try { char buf[1024]; file_read( f.get(), buf, sizeof(buf) ); } catch( boost::(:link - 1 - - 0 - - -7 - - - 2 - :) & e ) { e << file_name_info(file_name); throw; } }@] 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::(:link - 1 - - 0 - - -7 - - - 2 - :) object, stores the file name, and re-throws using a throw-expression with no operand (15.1.6). The rationale for catching any boost::(:link - 1 - - 0 - - -7 - - - 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''. As usual, the stored data can be retrieved using (:link - 1 - - 0 - - -25 - - - 2 - :). - - - - - 0 - - -10 - - - - 7 - 2 - (:auto !!!:) (:include decl:) !!!!Effects: * Default constructor: initializes an empty boost::(:link - 1 - - 0 - - -7 - - - 2 - :) object. * Copy constructor: initializes a boost::(:link - 1 - - 0 - - -7 - - - 2 - :) object which shares with x all data added through (:link - 1 - - 0 - - -11 - - - 2 - |operator<<:), including data that is added at a future time. !!!!Throws: Nothing. - - - - - 0 - - -11 - - - - 7 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link - 1 - - 0 - - -7 - - - 2 - :), or a type that derives (indirectly) from boost::(:link - 1 - - 0 - - -7 - - - 2 - :). !!!!Effects: Stores a copy of v into x. If x already contains data of type (:link - 1 - - 0 - - -6 - - - 2 - :)<Tag,T>, that data is overwritten. !!!!Returns: x. (:include throws:) - - - - - 0 - - -12 - - - - 17 - 2 - (:auto !!!:) The following example demonstrates how errno can be stored in exception objects using Boost Exception: [@#include <(:link - 1 - - 0 - - -32 - - - 2 - :)> #include <errno.h> #include <iostream> typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_errno,int> errno_info; //(1) class my_error: public boost::(:link - 1 - - 0 - - -7 - - - 2 - :), public std::exception { }; //(2) void f() { throw my_error() << errno_info(errno); //(3) } @] First, we instantiate the (:link - 1 - - 0 - - -6 - - - 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 - - -7 - - - 2 - :). Finally, (3) illustrates how the typedef from (1) can be used with (:link - 1 - - 0 - - -11 - - - 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( boost::shared_ptr<int const> err=boost::(:link - 1 - - 0 - - -25 - - - 2 - :)<errno_info>(x) ) std::cerr << "Error code: " << *err; } }@] The (:link - 1 - - 0 - - -25 - - - 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, the returned (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) will point to it; otherwise an empty (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) is returned. - - - - - 0 - - -13 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -14 - - - - 11 - 2 - (:auto !!!:) Here is how cloning can be enabled in a throw-expression (15.1): [@#include <(:link - 1 - - 0 - - -37 - - - 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 - - -7 - - - 2 - :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw boost::(:link - 1 - - 0 - - -20 - - - 2 - :)(file_read_error()) << errno_info(errno); }@] Of course, (:link - 1 - - 0 - - -20 - - - 2 - :) may be used with any exception type; there is no requirement that it should derive from boost::(:link - 1 - - 0 - - -7 - - - 2 - :). - - - - - 0 - - -15 - - 5 2 @@ -4817,7 +4286,7 @@ 0 - -7 + -5 2 @@ -4826,7 +4295,7 @@ 0 - -7 + -5 2 @@ -4837,228 +4306,13 @@ 0 - -16 + -7 - 15 + 11 2 - (:auto !!!:) (:include decl:) !!!!Returns: A string representation of all data stored in the boost::(:link - 1 - - 0 - - -7 - - - 2 - :) object by the (:link - 1 - - 0 - - -11 - - - 2 - |operator<<:) function. See "(:link - 1 - - 0 - - -24 - - - 2 - mod="w":)" for details. !!!!Throws: Nothing. !!!!Notes: *The return value remains valid until the exception object from which it was obtained is destroyed or modified. *The header (:link - 1 - - 0 - - -33 - - - 2 - :) provides a namespace-scope function (:link - 1 - - 0 - - -31 - - - 2 - :) which works with any exception. If its argument can be converted to boost::(:link - 1 - - 0 - - -7 - - - 2 - :), the output from (:link - 1 - - 0 - - -16 - - - 2 - :) is combined with other implementation-defined information into a std::string. - - - - - 0 - - -17 - - - - 5 - 2 - (:auto !!!:) (:include synopsis:) This type is used by the (:link - 1 - - 0 - - -19 - - - 2 - :) support in Boost Exception. Please see (:link - 1 - - 0 - - -28 - - - 2 - :). - - - - - 0 - - -18 - - - - 27 - 2 - (:auto !!:) Some exception hierarchies can not be modified to make boost::(:link - 1 - - 0 - - -7 - - - 2 - :) a base type. In this case, the (:link - 1 - - 0 - - -26 - - - 2 - :) function template can be used to make exception objects derive from boost::(:link - 1 - - 0 - - -7 - - - 2 - :) anyway. Here is an example: [@#include <(:link - 1 - - 0 - - -32 - - - 2 - :)> #include <stdexcept> typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_std_range_min,size_t> std_range_min; typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_std_range_max,size_t> std_range_max; typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_std_range_index,size_t> std_range_index; template <class T> class my_container { public: size_t size() const; T const & operator[]( size_t i ) const { if( i > size() ) throw boost::(:link - 1 - - 0 - - -26 - - - 2 - :)(std::range_error("Index out of range")) << std_range_min(0) << std_range_max(size()) << std_range_index(i); //.... } }; @] The call to (:link - 1 - - 0 - - -26 - - - 2 - :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link - 1 - - 0 - - -7 - - - 2 - :) and T. This makes it possible to use (:link - 1 - - 0 - - -11 - - - 2 - |operator<<:) to store additional information in the exception object. The exception can be intercepted as T &, so existing exception handling will not break. It can also be intercepted as boost::(:link - 1 - - 0 - - -7 - - - 2 - :) &, so that (:link + (:auto !!:) All exception types that derive from boost::(:link 1 0 @@ -5067,251 +4321,30 @@ 2 - |more information can be added to the exception at a later time:). - - - - - 0 - - -19 - - - - 17 - 2 - (:auto !!!:) (:include synopsis:) The (:link + :) 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::(:link 1 0 - -19 + -5 2 - :) type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; (:link + :) at the time of the throw, or at a later time. (:include 1 0 - -19 + -15 2 - :)'s operations do not throw. Two instances of (:link + :) (:include 1 0 - -19 - - - 2 - :) are equivalent and compare equal if and only if they refer to the same exception. The default constructor of (:link - 1 - - 0 - - -19 - - - 2 - :) produces the null value of the type. The null value is equivalent only to itself. !!!!Thread safety * It is legal for multiple threads to hold (:link - 1 - - 0 - - -19 - - - 2 - :) references to the same exception object. * It is illegal for multiple threads to modify the same (:link - 1 - - 0 - - -19 - - - 2 - :) object concurrently. * While calling - 1 - - 0 - - -28 - - - 2 - makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call - 1 - - 0 - - -30 - - - 2 - to throw the same exception object concurrently into multiple threads. - - - - - 0 - - -20 - - - - 21 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: T must be a class with an accessible no-throw copy constructor. !!!!Returns: An object of ''unspecified'' type which derives publicly from T. That is, the returned object can be intercepted by a catch(T &). !!!!Description: This function is designed to be used directly in a throw-expression to enable the (:link - 1 - - 0 - - -19 - - - 2 - :) support in Boost Exception. For example: [@class my_exception: public std::exception { }; .... throw boost::(:link - 1 - - 0 - - -20 - - - 2 - :)(my_exception());@] Unless (:link - 1 - - 0 - - -20 - - - 2 - :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link - 1 - - 0 - - -28 - - - 2 - :) may return an (:link - 1 - - 0 - - -19 - - - 2 - :) which refers to an instance of (:link - 1 - - 0 - - -17 - - - 2 - :). See (:link - 1 - - 0 - - -28 - - - 2 - :) for details. !!!!Note: Instead of using the throw keyword directly, it is preferable to call boost::(:link - 1 - - 0 - - -23 - - - 2 - :). This is guaranteed to throw an exception that derives from boost::(:link - 1 - - 0 - - -7 - - - 2 - :) and supports the (:link - 1 - - 0 - - -19 - - - 2 - :) functionality. - - - - - 0 - - -21 - - - - 0 - - - - - 0 - - -22 - - - - 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 - - -20 - - - 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 - - -23 - - - 2 - :) are guaranteed to derive from boost::(:link - 1 - - 0 - - -7 - - - 2 - :) and to support cloning. (:include - 1 - - 0 - - -14 + -9 2 @@ -5331,199 +4364,231 @@ 0 - -23 + -8 - 13 + 25 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: E must derive publicly from std::exception. !!!!Effects: * If BOOST_NO_EXCEPTIONS is not defined, boost::(:link + (: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 - -23 + -8 2 - :)(e) is equivalent to throw boost::(:link + :)<Tag,T> can be passed to (:link 1 0 - -20 + -14 2 - :)(boost::(:link + |operator<<:) to be stored in objects of type boost::(:link 1 0 - -26 + -5 2 - :)(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::(:link + :). !!!!Note: The header <(:link 1 0 - -23 + -35 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 + :)> provides a declaration of the (:link 1 0 - -23 + -8 2 - are allowed to assume that the function never returns; therefore, if the user-defined + :) template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, like this: [@#include <(:link 1 0 - -23 + -35 2 - returns, the behavior is undefined. + :)> typedef boost::(:link + 1 + + 0 + + -8 + + + 2 + :)<struct tag_errno,int> errno_info;@] Of course, to actually add an (:link + 1 + + 0 + + -8 + + + 2 + :) object to (:link + 1 + + 0 + + -5 + + + 2 + mod="p":) using (:link + 1 + + 0 + + -14 + + + 2 + |operator<<:), or to retrieve it using (:link + 1 + + 0 + + -10 + + + 2 + :), you must first #include <(:link + 1 + + 0 + + -38 + + + 2 + :)>. 0 - -29 - - - - 3 - 2 - (:auto !!!:) (:include synopsis:) !!!!Effects: As if try { throw e; } catch( ... ) { return (:link - 1 - - 0 - - -28 - - - 2 - :)(); } - - - - - 0 - - -24 + -9 21 2 - (:auto !!:) Class boost::(:link + (:auto !!!:) 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> #include <string> class file_read_error { public: explicit file_read_error( std::string const & fn ): fn_(fn) { }; std::string const & file_name() const { return fn_; } private: std::string fn_; }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error("????"); }@] We have defined an exception class file_read_error which can store a file name, so that when we catch a file_read_error object, we know which file the failure is related to. However, the file_read function does not have the file name at the time of the throw; all it has is a FILE handle. One possible solution is to not use FILE handles directly. We could have our own class file which stores both a FILE handle and a file name, and pass that to file_read. However, this could be problematic if we communicate with 3rd party code that does not use our class file (probably because they have their own similar class.) A better solution is to make class file_read_error derive (possibly indirectly) from boost::(:link 1 0 - -7 + -5 2 - :) provides a virtual member function (:link + :), and free the file_read function from the burden of storing the file name in exceptions it throws: [@#include <(:link 1 0 - -16 + -33 2 - mod="m":), 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 <(:link + :)> #include <stdio.h> #include <errno.h> typedef boost::(:link 1 0 - -32 + -8 2 - :)> #include <iostream> void f(); //throws unknown types that derive from boost::(:link + :)<struct tag_errno,int> errno_info; class file_read_error: public boost::(:link 1 0 - -7 + -5 2 - :). void g() { try { f(); } catch( boost::(:link + :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error() << errno_info(errno); }@] If file_read detects a failure, it throws an exception which contains the information that is available at the time, namely the errno. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally: [@#include <(:link 1 0 - -7 + -33 2 - :) & e ) { std::cerr << e.(:link + :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> typedef boost::(:link 1 0 - -16 + -8 2 - mod="m":)(); } }@] The (:link + :)<struct tag_file_name,std::string> file_name_info; boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode ); void file_read( FILE * f, void * buffer, size_t size ); void parse_file( char const * file_name ) { boost::shared_ptr<FILE> f = file_open(file_name,"rb"); assert(f); try { char buf[1024]; file_read( f.get(), buf, sizeof(buf) ); } catch( boost::(:link 1 0 - -16 + -5 2 - mod="m":) member function iterates over all data objects stored in the boost::(:link + :) & e ) { e << file_name_info(file_name); throw; } }@] 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::(:link 1 0 - -7 + -5 2 - :) through (:link + :) object, stores the file name, and re-throws using a throw-expression with no operand (15.1.6). The rationale for catching any boost::(:link 1 0 - -11 + -5 2 - |operator<<:). The returned string is constructed by converting each data object to string and then concatenating these strings together. When the (:link + :) 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 (:link 1 0 - -6 + -10 2 - :)<Tag,T> template is instantiated, the system attempts overload resolution for an unqualified call to to_string(x), where x is of type T. If this is successful, the to_string overload is expected to return std::string and is used to convert objects of type T to string. Otherwise, the system attempts overload resolution for s << x, where s is a std::ostringstream and x is of type T. If this is successful, the operator<< overload is used to convert objects of type T to string. Otherwise the system is unable to convert objects of type T to string, and an unspecified stub string value is used without issuing a compile error. + :). 0 - -25 + -10 @@ -5534,7 +4599,7 @@ 0 - -6 + -8 2 @@ -5543,7 +4608,7 @@ 0 - -25 + -10 2 @@ -5552,7 +4617,7 @@ 0 - -7 + -5 2 @@ -5561,7 +4626,7 @@ 0 - -11 + -14 2 @@ -5572,31 +4637,1155 @@ 0 - -26 + -11 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -12 + + + + 27 + 2 + (:auto !!:) Some exception hierarchies can not be modified to make boost::(:link + 1 + + 0 + + -5 + + + 2 + :) a base type. In this case, the (:link + 1 + + 0 + + -28 + + + 2 + :) function template can be used to make exception objects derive from boost::(:link + 1 + + 0 + + -5 + + + 2 + :) anyway. Here is an example: [@#include <(:link + 1 + + 0 + + -33 + + + 2 + :)> #include <stdexcept> typedef boost::(:link + 1 + + 0 + + -8 + + + 2 + :)<struct tag_std_range_min,size_t> std_range_min; typedef boost::(:link + 1 + + 0 + + -8 + + + 2 + :)<struct tag_std_range_max,size_t> std_range_max; typedef boost::(:link + 1 + + 0 + + -8 + + + 2 + :)<struct tag_std_range_index,size_t> std_range_index; template <class T> class my_container { public: size_t size() const; T const & operator[]( size_t i ) const { if( i > size() ) throw boost::(:link + 1 + + 0 + + -28 + + + 2 + :)(std::range_error("Index out of range")) << std_range_min(0) << std_range_max(size()) << std_range_index(i); //.... } }; @] The call to (:link + 1 + + 0 + + -28 + + + 2 + :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link + 1 + + 0 + + -5 + + + 2 + :) and T. This makes it possible to use (:link + 1 + + 0 + + -14 + + + 2 + |operator<<:) to store additional information in the exception object. The exception can be intercepted as T &, so existing exception handling will not break. It can also be intercepted as boost::(:link + 1 + + 0 + + -5 + + + 2 + :) &, so that (:link + 1 + + 0 + + -7 + + + 2 + |more information can be added to the exception at a later time:). + + + + + 0 + + -13 + + + + 7 + 2 + (:auto !!!:) (:include decl:) !!!!Effects: * Default constructor: initializes an empty boost::(:link + 1 + + 0 + + -5 + + + 2 + :) object. * Copy constructor: initializes a boost::(:link + 1 + + 0 + + -5 + + + 2 + :) object which shares with x all data added through (:link + 1 + + 0 + + -14 + + + 2 + |operator<<:), including data that is added at a future time. !!!!Throws: Nothing. + + + + + 0 + + -14 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link + 1 + + 0 + + -5 + + + 2 + :), or a type that derives (indirectly) from boost::(:link + 1 + + 0 + + -5 + + + 2 + :). !!!!Effects: Stores a copy of v into x. If x already contains data of type (:link + 1 + + 0 + + -8 + + + 2 + :)<Tag,T>, that data is overwritten. !!!!Returns: x. (:include throws:) + + + + + 0 + + -15 + + + + 17 + 2 + (:auto !!!:) The following example demonstrates how errno can be stored in exception objects using Boost Exception: [@#include <(:link + 1 + + 0 + + -33 + + + 2 + :)> #include <errno.h> #include <iostream> typedef boost::(:link + 1 + + 0 + + -8 + + + 2 + :)<struct tag_errno,int> errno_info; //(1) class my_error: public boost::(:link + 1 + + 0 + + -5 + + + 2 + :), public std::exception { }; //(2) void f() { throw my_error() << errno_info(errno); //(3) } @] First, we instantiate the (:link + 1 + + 0 + + -8 + + + 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 + + -5 + + + 2 + :). Finally, (3) illustrates how the typedef from (1) can be used with (:link + 1 + + 0 + + -14 + + + 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( boost::shared_ptr<int const> err=boost::(:link + 1 + + 0 + + -10 + + + 2 + :)<errno_info>(x) ) std::cerr << "Error code: " << *err; } }@] The (:link + 1 + + 0 + + -10 + + + 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, the returned (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) will point to it; otherwise an empty (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) is returned. + + + + + 0 + + -16 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -17 + + + + 11 + 2 + (:auto !!!:) Here is how cloning can be enabled in a throw-expression (15.1): [@#include <(:link + 1 + + 0 + + -38 + + + 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 + + -5 + + + 2 + :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw boost::(:link + 1 + + 0 + + -23 + + + 2 + :)(file_read_error()) << errno_info(errno); }@] Of course, (:link + 1 + + 0 + + -23 + + + 2 + :) may be used with any exception type; there is no requirement that it should derive from boost::(:link + 1 + + 0 + + -5 + + + 2 + :). + + + + + 0 + + -18 + + + + 37 + 2 + (:auto !!!:) When you catch an exception, you can call (:link + 1 + + 0 + + -22 + + + 2 + :) to get an (:link + 1 + + 0 + + -21 + + + 2 + :) object: [@#include <(:link + 1 + + 0 + + -11 + + + 2 + :)> #include <boost/thread.hpp> #include <boost/bind.hpp> void do_work(); //throws cloning-enabled boost::(:link + 1 + + 0 + + -5 + + + 2 + :)s void worker_thread( boost::(:link + 1 + + 0 + + -21 + + + 2 + :) & error ) { try { do_work(); error = boost::(:link + 1 + + 0 + + -21 + + + 2 + :)(); } catch( ... ) { error = boost::(:link + 1 + + 0 + + -22 + + + 2 + :)(); } }@] In the above example, note that (:link + 1 + + 0 + + -22 + + + 2 + :) captures the original type of the exception object. The exception can be thrown again using the (:link + 1 + + 0 + + -31 + + + 2 + :) function: [@// ...continued void work() { boost::(:link + 1 + + 0 + + -21 + + + 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 + + -31 + + + 2 + :)(error); }@] Note that (:link + 1 + + 0 + + -22 + + + 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 + + -21 + + + 2 + :) points to an instance of std::bad_alloc, or * if (:link + 1 + + 0 + + -23 + + + 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 + + -21 + + + 2 + :) points to an instance of (:link + 1 + + 0 + + -20 + + + 2 + :). Regardless, the use of (:link + 1 + + 0 + + -22 + + + 2 + :) and (:link + 1 + + 0 + + -31 + + + 2 + :) in the above examples is well-formed. + + + + + 0 + + -19 + + + + 15 + 2 + (:auto !!!:) (:include decl:) !!!!Returns: A string representation of all data stored in the boost::(:link + 1 + + 0 + + -5 + + + 2 + :) object by the (:link + 1 + + 0 + + -14 + + + 2 + |operator<<:) function. See "(:link + 1 + + 0 + + -27 + + + 2 + mod="w":)" for details. !!!!Throws: Nothing. !!!!Notes: *The return value remains valid until the exception object from which it was obtained is destroyed or modified. *The header (:link + 1 + + 0 + + -34 + + + 2 + :) provides a namespace-scope function (:link + 1 + + 0 + + -32 + + + 2 + :) which works with any exception. If its argument can be converted to boost::(:link + 1 + + 0 + + -5 + + + 2 + :), the output from (:link + 1 + + 0 + + -19 + + + 2 + :) is combined with other implementation-defined information into a std::string. + + + + + 0 + + -20 5 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: T must be a class with an accessible no-throw copy constructor as per (15.5.1). !!!!Returns: * If T derives from boost::(:link + (:auto !!!:) (:include synopsis:) This type is used by the (:link 1 0 - -7 + -21 2 - :), the returned object is of type T and is a copy of x. * Otherwise, the returned object is of an unspecified type that derives publicly from both T and boost::(:link + :) support in Boost Exception. Please see (:link 1 0 - -7 + -22 2 - :). The T sub-object is initialized from x by the T copy constructor. !!!!Throws: Nothing. + :). + + + + + 0 + + -21 + + + + 17 + 2 + (:auto !!!:) (:include synopsis:) The (:link + 1 + + 0 + + -21 + + + 2 + :) type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; (:link + 1 + + 0 + + -21 + + + 2 + :)'s operations do not throw. Two instances of (:link + 1 + + 0 + + -21 + + + 2 + :) are equivalent and compare equal if and only if they refer to the same exception. The default constructor of (:link + 1 + + 0 + + -21 + + + 2 + :) produces the null value of the type. The null value is equivalent only to itself. !!!!Thread safety * It is legal for multiple threads to hold (:link + 1 + + 0 + + -21 + + + 2 + :) references to the same exception object. * It is illegal for multiple threads to modify the same (:link + 1 + + 0 + + -21 + + + 2 + :) object concurrently. * While calling + 1 + + 0 + + -22 + + + 2 + makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call + 1 + + 0 + + -31 + + + 2 + to throw the same exception object concurrently into multiple threads. + + + + + 0 + + -22 + + + + 29 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: The (:link + 1 + + 0 + + -22 + + + 2 + :) function must not be called outside of a catch block. !!!!Returns: * An (:link + 1 + + 0 + + -21 + + + 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 + 1 + + 0 + + -21 + + + 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 + 1 + + 0 + + -22 + + + 2 + :) refer to the same exception object. * Correct implementation of (:link + 1 + + 0 + + -22 + + + 2 + :) may require compiler support, unless (:link + 1 + + 0 + + -23 + + + 2 + :) was used at the time the currently handled exception object was passed to throw. If (:link + 1 + + 0 + + -23 + + + 2 + :) was not used, and if the compiler does not provide the necessary support, then (:link + 1 + + 0 + + -22 + + + 2 + :) may return an (:link + 1 + + 0 + + -21 + + + 2 + :) that refers to an instance of (:link + 1 + + 0 + + -20 + + + 2 + :). In this case, if the original exception object derives from boost::(:link + 1 + + 0 + + -5 + + + 2 + :), then the boost::(:link + 1 + + 0 + + -5 + + + 2 + :) sub-object of the (:link + 1 + + 0 + + -20 + + + 2 + :) object is initialized by the boost::(:link + 1 + + 0 + + -5 + + + 2 + :) copy constructor. + + + + + 0 + + -23 + + + + 21 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: T must be a class with an accessible no-throw copy constructor. !!!!Returns: An object of ''unspecified'' type which derives publicly from T. That is, the returned object can be intercepted by a catch(T &). !!!!Description: This function is designed to be used directly in a throw-expression to enable the (:link + 1 + + 0 + + -21 + + + 2 + :) support in Boost Exception. For example: [@class my_exception: public std::exception { }; .... throw boost::(:link + 1 + + 0 + + -23 + + + 2 + :)(my_exception());@] Unless (:link + 1 + + 0 + + -23 + + + 2 + :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link + 1 + + 0 + + -22 + + + 2 + :) may return an (:link + 1 + + 0 + + -21 + + + 2 + :) which refers to an instance of (:link + 1 + + 0 + + -20 + + + 2 + :). See (:link + 1 + + 0 + + -22 + + + 2 + :) for details. !!!!Note: Instead of using the throw keyword directly, it is preferable to call boost::(:link + 1 + + 0 + + -26 + + + 2 + :). This is guaranteed to throw an exception that derives from boost::(:link + 1 + + 0 + + -5 + + + 2 + :) and supports the (:link + 1 + + 0 + + -21 + + + 2 + :) functionality. + + + + + 0 + + -24 + + + + 0 + + + + + 0 + + -25 + + + + 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 + + -23 + + + 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 + + -26 + + + 2 + :) are guaranteed to derive from boost::(:link + 1 + + 0 + + -5 + + + 2 + :) and to support cloning. (:include + 1 + + 0 + + -17 + + + 2 + :) (:include + 1 + + 0 + + -18 + + + 2 + :) + + + + + 0 + + -26 + + + + 13 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: E must derive publicly from std::exception. !!!!Effects: * If BOOST_NO_EXCEPTIONS is not defined, boost::(:link + 1 + + 0 + + -26 + + + 2 + :)(e) is equivalent to throw boost::(:link + 1 + + 0 + + -23 + + + 2 + :)(boost::(:link + 1 + + 0 + + -28 + + + 2 + :)(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::(:link + 1 + + 0 + + -26 + + + 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 + 1 + + 0 + + -26 + + + 2 + are allowed to assume that the function never returns; therefore, if the user-defined + 1 + + 0 + + -26 + + + 2 + returns, the behavior is undefined. + + + + + 0 + + -30 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) !!!!Effects: As if [@try { throw + 1 + + 0 + + -23 + + + 2 + (e); } catch(...) { return (:link + 1 + + 0 + + -22 + + + 2 + :)(); }@] @@ -5606,6 +5795,153 @@ -27 + + 21 + 2 + (:auto !!:) Class boost::(:link + 1 + + 0 + + -5 + + + 2 + :) provides a virtual member function (:link + 1 + + 0 + + -19 + + + 2 + mod="m":), 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 <(:link + 1 + + 0 + + -33 + + + 2 + :)> #include <iostream> void f(); //throws unknown types that derive from boost::(:link + 1 + + 0 + + -5 + + + 2 + :). void g() { try { f(); } catch( boost::(:link + 1 + + 0 + + -5 + + + 2 + :) & e ) { std::cerr << e.(:link + 1 + + 0 + + -19 + + + 2 + mod="m":)(); } }@] The (:link + 1 + + 0 + + -19 + + + 2 + mod="m":) member function iterates over all data objects stored in the boost::(:link + 1 + + 0 + + -5 + + + 2 + :) through (:link + 1 + + 0 + + -14 + + + 2 + |operator<<:). The returned string is constructed by converting each data object to string and then concatenating these strings together. When the (:link + 1 + + 0 + + -8 + + + 2 + :)<Tag,T> template is instantiated, the system attempts overload resolution for an unqualified call to to_string(x), where x is of type T. If this is successful, the to_string overload is expected to return std::string and is used to convert objects of type T to string. Otherwise, the system attempts overload resolution for s << x, where s is a std::ostringstream and x is of type T. If this is successful, the operator<< overload is used to convert objects of type T to string. Otherwise the system is unable to convert objects of type T to string, and an unspecified stub string value is used without issuing a compile error. + + + + + 0 + + -35 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -28 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: T must be a class with an accessible no-throw copy constructor as per (15.5.1). !!!!Returns: * If T derives from boost::(:link + 1 + + 0 + + -5 + + + 2 + :), the returned object is of type T and is a copy of x. * Otherwise, the returned object is of an unspecified type that derives publicly from both T and boost::(:link + 1 + + 0 + + -5 + + + 2 + :). The T sub-object is initialized from x by the T copy constructor. !!!!Throws: Nothing. + + + + + 0 + + -29 + + 7 2 @@ -5614,7 +5950,7 @@ 0 - -11 + -14 2 @@ -5623,7 +5959,7 @@ 0 - -7 + -5 2 @@ -5632,7 +5968,7 @@ 0 - -6 + -8 2 @@ -5643,7 +5979,7 @@ 0 - -30 + -31 @@ -5656,168 +5992,7 @@ 0 - -40 - - - - 3 - 2 - (:auto !!!:) (:include decl:) !!!!Effects: Frees all resources associated with a boost::(:link - 1 - - 0 - - -7 - - - 2 - :) object. !!!!Throws: Nothing. - - - - - 0 - - -28 - - - - 29 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: The (:link - 1 - - 0 - - -28 - - - 2 - :) function must not be called outside of a catch block. !!!!Returns: * An (:link - 1 - - 0 - - -19 - - - 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 - 1 - - 0 - - -19 - - - 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 - 1 - - 0 - - -28 - - - 2 - :) refer to the same exception object. * Correct implementation of (:link - 1 - - 0 - - -28 - - - 2 - :) may require compiler support, unless (:link - 1 - - 0 - - -20 - - - 2 - :) was used at the time the currently handled exception object was passed to throw. If (:link - 1 - - 0 - - -20 - - - 2 - :) was not used, and if the compiler does not provide the necessary support, then (:link - 1 - - 0 - - -28 - - - 2 - :) may return an (:link - 1 - - 0 - - -19 - - - 2 - :) that refers to an instance of (:link - 1 - - 0 - - -17 - - - 2 - :). In this case, if the original exception object derives from boost::(:link - 1 - - 0 - - -7 - - - 2 - :), then the boost::(:link - 1 - - 0 - - -7 - - - 2 - :) sub-object of the (:link - 1 - - 0 - - -17 - - - 2 - :) object is initialized by the boost::(:link - 1 - - 0 - - -7 - - - 2 - :) copy constructor. - - - - - 0 - - -31 + -32 @@ -5828,7 +6003,7 @@ 0 - -7 + -5 2 @@ -5837,39 +6012,13 @@ 0 - -16 + -19 2 :). - - - 0 - - -33 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -32 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - 0 @@ -5887,7 +6036,7 @@ 0 - -35 + -33 @@ -5942,6 +6091,19 @@ -39 + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -40 + + 0 @@ -5954,63 +6116,18 @@ - 13 + 3 2 - (:auto !!!:) The code snippet below demonstrates how boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|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 <(:link + (:auto !!!:) (:include decl:) !!!!Effects: Frees all resources associated with a boost::(:link 1 0 - -13 + -5 2 - :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> #include <errno.h> typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_file_name,std::string> file_name_info; typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_function,char const *> function_info; typedef boost::(:link - 1 - - 0 - - -6 - - - 2 - :)<struct tag_errno,int> errno_info; typedef boost::tuple<function_info,errno_info> clib_failure; class file_open_error: public boost::(:link - 1 - - 0 - - -7 - - - 2 - :) { }; boost::shared_ptr<FILE> file_open( char const * name, char const * mode ) { if( FILE * f=fopen(name,mode) ) return boost::shared_ptr<FILE>(f,fclose); else throw file_open_error() << file_name_info(name) << clib_failure("fopen",errno); }@] Note that the members of a boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) are stored separately in exception objects; they can only be retrieved individually, using (:link - 1 - - 0 - - -25 - - - 2 - :). + :) object. !!!!Throws: Nothing. @@ -6021,27 +6138,18 @@ - 37 + 13 2 - (:auto !!!:) When you catch an exception, you can call (:link + (:auto !!!:) The code snippet below demonstrates how boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|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 <(:link 1 0 - -28 + -16 2 - :) to get an (:link - 1 - - 0 - - -19 - - - 2 - :) object: [@#include <(:link + :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> #include <errno.h> typedef boost::(:link 1 0 @@ -6050,142 +6158,43 @@ 2 - :)> #include <boost/thread.hpp> #include <boost/bind.hpp> void do_work(); //throws cloning-enabled boost::(:link + :)<struct tag_file_name,std::string> file_name_info; typedef boost::(:link 1 0 - -7 + -8 2 - :)s void worker_thread( boost::(:link + :)<struct tag_function,char const *> function_info; typedef boost::(:link 1 0 - -19 + -8 2 - :) & error ) { try { do_work(); error = boost::(:link + :)<struct tag_errno,int> errno_info; typedef boost::tuple<function_info,errno_info> clib_failure; class file_open_error: public boost::(:link 1 0 - -19 + -5 2 - :)(); } catch( ... ) { error = boost::(:link + :) { }; boost::shared_ptr<FILE> file_open( char const * name, char const * mode ) { if( FILE * f=fopen(name,mode) ) return boost::shared_ptr<FILE>(f,fclose); else throw file_open_error() << file_name_info(name) << clib_failure("fopen",errno); }@] Note that the members of a boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) are stored separately in exception objects; they can only be retrieved individually, using (:link 1 0 - -28 + -10 2 - :)(); } }@] In the above example, note that (:link - 1 - - 0 - - -28 - - - 2 - :) captures the original type of the exception object. The exception can be thrown again using the (:link - 1 - - 0 - - -30 - - - 2 - :) function: [@// ...continued void work() { boost::(:link - 1 - - 0 - - -19 - - - 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 - - -30 - - - 2 - :)(error); }@] Note that (:link - 1 - - 0 - - -28 - - - 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 - - -19 - - - 2 - :) points to an instance of std::bad_alloc, or * if (:link - 1 - - 0 - - -20 - - - 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 - - -19 - - - 2 - :) points to an instance of (:link - 1 - - 0 - - -17 - - - 2 - :). Regardless, the use of (:link - 1 - - 0 - - -28 - - - 2 - :) and (:link - 1 - - 0 - - -30 - - - 2 - :) in the above examples is well-formed. + :). @@ -6221,7 +6230,9 @@ - 0 + 1 + 2 + !!!!Throws: std::bad_alloc, or any exception emitted by T1..TN copy constructor. @@ -6276,9 +6287,7 @@ - 1 - 2 - !!!!Throws: std::bad_alloc, or any exception emitted by the T copy constructor. + 0 @@ -6311,7 +6320,9 @@ - 0 + 1 + 2 + !!!!Throws: std::bad_alloc, or any exception emitted by the T copy constructor. @@ -6322,9 +6333,7 @@ - 1 - 2 - !!!!Throws: std::bad_alloc, or any exception emitted by T1..TN copy constructor. + 0 @@ -6415,17 +6424,6 @@ 0 - - - 0 - - -29 - - - - 0 - - 0 @@ -6459,17 +6457,6 @@ 0 - - - 0 - - -27 - - - - 0 - - 0 @@ -6485,7 +6472,18 @@ 0 - -40 + -27 + + + + 0 + + + + + 0 + + -35 @@ -6507,7 +6505,7 @@ 0 - -31 + -29 @@ -6518,7 +6516,7 @@ 0 - -33 + -31 @@ -6551,7 +6549,7 @@ 0 - -35 + -33 @@ -6602,6 +6600,17 @@ 0 + + + 0 + + -40 + + + + 0 + + 0 @@ -6646,7 +6655,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -36 + + + 2 + :)> [@namespace boost { (:include def pre_indent="4":) }@] @@ -6657,18 +6677,27 @@ - 3 + 5 2 `#include <(:link 1 0 - -37 + -16 2 - :)> [@namespace boost { (:include def pre_indent="4":) }@] + :)> [@namespace boost { (:include + 1 + + 0 + + -6 + + + 2 + decl pre_indent="4":) }@] @@ -6679,18 +6708,7 @@ - 3 - 2 - `#include <(:link - 1 - - 0 - - -35 - - - 2 - :)> [@namespace boost { (:include def pre_indent="4":) }@] + 0 @@ -6703,16 +6721,16 @@ 3 2 - [@#include <(:link + `#include <(:link 1 0 - -35 + -38 2 - :)> namespace boost { (:include api pre_indent="4":) }@] + :)> [@namespace boost { (:include def pre_indent="4":) }@] @@ -6734,7 +6752,18 @@ - 0 + 3 + 2 + `#include < + 1 + + 0 + + -37 + + + 2 + > [@namespace boost { (:include decl pre_indent="4":) }@] @@ -6747,16 +6776,16 @@ 3 2 - `#include <(:link + [@#include <(:link 1 0 - -37 + -36 2 - :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] + :)> namespace boost { (:include api pre_indent="4":) }@] @@ -6778,9 +6807,7 @@ - 1 - 2 - [@#include <boost/tuple/tuple.hpp> namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -6791,7 +6818,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -38 + + + 2 + :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] @@ -6802,27 +6840,7 @@ - 5 - 2 - `#include <(:link - 1 - - 0 - - -13 - - - 2 - :)> [@namespace boost { (:include - 1 - - 0 - - -15 - - - 2 - decl pre_indent="4":) }@] + 0 @@ -6833,7 +6851,9 @@ - 0 + 1 + 2 + [@#include <boost/tuple/tuple.hpp> namespace boost { (:include api pre_indent="4":) }@] @@ -6844,18 +6864,7 @@ - 3 - 2 - `#include <(:link - 1 - - 0 - - -8 - - - 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] + 0 @@ -6877,18 +6886,7 @@ - 3 - 2 - `#include <(:link - 1 - - 0 - - -8 - - - 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] + 0 @@ -6901,16 +6899,16 @@ 3 2 - `#include < + `#include <(:link 1 0 - -35 + -11 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] + :)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -6921,7 +6919,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -11 + + + 2 + :)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -6932,7 +6941,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -11 + + + 2 + :)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -6942,61 +6962,6 @@ -23 - - 3 - 2 - `#include <(:link - 1 - - 0 - - -38 - - - 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -29 - - - - 3 - 2 - `#include <(:link - 1 - - 0 - - -8 - - - 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -24 - - - - 0 - - - - - 0 - - -25 - - 3 2 @@ -7016,29 +6981,29 @@ 0 - -26 + -24 - 3 - 2 - `#include < - 1 - - 0 - - -35 - - - 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] + 0 0 - -27 + -25 + + + + 0 + + + + + 0 + + -26 @@ -7049,7 +7014,7 @@ 0 - -37 + -39 2 @@ -7071,7 +7036,7 @@ 0 - -8 + -11 2 @@ -7082,13 +7047,26 @@ 0 - -40 + -27 0 + + + 0 + + -35 + + + + 1 + 2 + [@namespace boost { (:include api pre_indent="4":) }@] + + 0 @@ -7096,6 +7074,28 @@ -28 + + 3 + 2 + `#include < + 1 + + 0 + + -36 + + + 2 + > [@namespace boost { (:include decl pre_indent="4":) }@] + + + + + 0 + + -29 + + 3 2 @@ -7104,7 +7104,7 @@ 0 - -8 + -38 2 @@ -7126,26 +7126,13 @@ 0 - -33 + -11 2 :)> [@namespace boost { (:include decl pre_indent="4":) }@] - - - 0 - - -33 - - - - 1 - 2 - [@#include <exception> namespace boost { (:include api pre_indent="4":) }@] - - 0 @@ -7154,9 +7141,18 @@ - 1 + 3 2 - [@(:include api:)@] + `#include <(:link + 1 + + 0 + + -34 + + + 2 + :)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -7169,20 +7165,20 @@ 1 2 - [@namespace boost { (:include api pre_indent="4":) }@] + [@#include <exception> namespace boost { (:include api pre_indent="4":) }@] 0 - -35 + -33 1 2 - [@namespace boost { (:include api pre_indent="4":) }@] + [@(:include api:)@] @@ -7195,7 +7191,7 @@ 1 2 - [@#include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] + [@namespace boost { (:include api pre_indent="4":) }@] @@ -7206,18 +7202,9 @@ - 3 + 1 2 - [@#include <(:link - 1 - - 0 - - -35 - - - 2 - :)> #include <boost/current_function.hpp> #include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] + [@#include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] @@ -7235,7 +7222,29 @@ 0 - -35 + -36 + + + 2 + :)> #include <boost/current_function.hpp> #include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] + + + + + 0 + + -39 + + + + 3 + 2 + [@#include <(:link + 1 + + 0 + + -36 2 @@ -7246,7 +7255,7 @@ 0 - -39 + -40 @@ -7350,9 +7359,6 @@ -23 - - -29 - -24 @@ -7362,23 +7368,23 @@ -26 - - -27 - -30 - -40 + -27 + + + -35 -28 - -31 + -29 - -33 + -31 -32 @@ -7387,7 +7393,7 @@ -34 - -35 + -33 -36 @@ -7401,6 +7407,9 @@ -39 + + -40 + -41 @@ -7426,7 +7435,7 @@ - -21 + -24 @@ -7443,7 +7452,7 @@ - -22 + -25 @@ -7460,7 +7469,7 @@ - -5 + -7 @@ -7477,7 +7486,7 @@ - -39 + -40 @@ -7501,7 +7510,7 @@ - -33 + -34 @@ -7525,7 +7534,7 @@ - -42 + -18 @@ -7553,7 +7562,7 @@ - -31 + -32 @@ -7577,7 +7586,7 @@ - -18 + -12 @@ -7601,7 +7610,7 @@ - -36 + -37 @@ -7625,7 +7634,7 @@ - -27 + -29 @@ -7653,7 +7662,7 @@ - -11 + -14 @@ -7681,7 +7690,7 @@ - -6 + -8 @@ -7705,7 +7714,7 @@ - -38 + -39 @@ -7733,7 +7742,7 @@ - -29 + -30 @@ -7761,7 +7770,7 @@ - -17 + -20 @@ -7789,7 +7798,7 @@ - -28 + -22 @@ -7817,7 +7826,7 @@ - -19 + -21 @@ -7845,7 +7854,7 @@ - -30 + -31 @@ -7873,7 +7882,7 @@ - -23 + -26 @@ -7897,7 +7906,7 @@ - -8 + -11 @@ -7925,7 +7934,7 @@ - -25 + -10 @@ -7949,7 +7958,7 @@ - -13 + -16 @@ -7973,7 +7982,7 @@ - -14 + -17 @@ -7997,7 +8006,7 @@ - -35 + -36 @@ -8025,7 +8034,7 @@ - -7 + -5 @@ -8057,7 +8066,7 @@ - -16 + -19 @@ -8089,7 +8098,7 @@ - -10 + -13 @@ -8117,7 +8126,7 @@ - -40 + -41 @@ -8145,7 +8154,7 @@ - -20 + -23 @@ -8173,7 +8182,7 @@ - -26 + -28 @@ -8221,7 +8230,7 @@ - -37 + -38 @@ -8245,7 +8254,7 @@ - -24 + -27 @@ -8273,7 +8282,7 @@ - -34 + -35 @@ -8301,7 +8310,7 @@ - -15 + -6 @@ -8325,7 +8334,7 @@ - -12 + -15 @@ -8349,7 +8358,7 @@ - -41 + -42 @@ -8373,7 +8382,7 @@ - -32 + -33 @@ -8404,7 +8413,7 @@ -5 - tutorial + type @@ -8413,7 +8422,7 @@ -6 - type + error_info free function @@ -8422,7 +8431,7 @@ -7 - type + tutorial @@ -8431,7 +8440,7 @@ -8 - + type @@ -8449,7 +8458,7 @@ -10 - function + error_info free function @@ -8458,7 +8467,7 @@ -11 - error_info free function + @@ -8467,7 +8476,7 @@ -12 - noalso noindex tutorial + tutorial @@ -8476,7 +8485,7 @@ -13 - + function @@ -8485,7 +8494,7 @@ -14 - noalso noindex tutorial + error_info free function @@ -8494,7 +8503,7 @@ -15 - error_info free function + noalso noindex tutorial @@ -8503,7 +8512,7 @@ -16 - function + @@ -8512,7 +8521,7 @@ -17 - exception_ptr type + noalso noindex tutorial @@ -8521,7 +8530,7 @@ -18 - tutorial + noalso noindex tutorial @@ -8530,7 +8539,7 @@ -19 - type + function @@ -8539,7 +8548,7 @@ -20 - exception_ptr free function + exception_ptr type @@ -8548,7 +8557,7 @@ -21 - noindex + type @@ -8557,7 +8566,7 @@ -22 - tutorial + exception_ptr free function @@ -8566,15 +8575,6 @@ -23 - free function - - - - 0 - - -29 - - exception_ptr free function @@ -8584,7 +8584,7 @@ -24 - diagnostic_information tutorial + noindex @@ -8593,7 +8593,7 @@ -25 - error_info free function + tutorial @@ -8602,16 +8602,7 @@ -26 - error_info free function - - - - 0 - - -27 - - - + free function @@ -8626,55 +8617,10 @@ 0 - -40 + -27 - function - - - - 0 - - -28 - - - exception_ptr free function - - - - 0 - - -31 - - - diagnostic_information free function - - - - 0 - - -33 - - - - - - - 0 - - -32 - - - - - - - 0 - - -34 - - - + diagnostic_information tutorial @@ -8685,6 +8631,60 @@ + + + 0 + + -28 + + + error_info free function + + + + 0 + + -29 + + + + + + + 0 + + -31 + + + exception_ptr free function + + + + 0 + + -32 + + + diagnostic_information free function + + + + 0 + + -34 + + + + + + + 0 + + -33 + + + + 0 @@ -8692,7 +8692,7 @@ -36 - error_info + @@ -8701,7 +8701,7 @@ -37 - + error_info @@ -8719,6 +8719,15 @@ -39 + + + + + 0 + + -40 + + index noindex @@ -8728,7 +8737,7 @@ -41 - noalso noindex tutorial + function