diff --git a/doc/boost_exception_diagnostic_information_hpp.html b/doc/boost_exception_diagnostic_information_hpp.html index e0761eb..c2ee56d 100644 --- a/doc/boost_exception_diagnostic_information_hpp.html +++ b/doc/boost_exception_diagnostic_information_hpp.html @@ -41,6 +41,7 @@ boost
boost/exception/all.hpp
current_exception_diagnostic_information
diagnostic_information
+
diagnostic_information_what
Synopsis
diff --git a/doc/diagnostic_information.html b/doc/diagnostic_information.html index 6dcc670..9a3dc3a 100644 --- a/doc/diagnostic_information.html +++ b/doc/diagnostic_information.html @@ -78,6 +78,7 @@ std::exception::what: example_io error Configuration Macros
current_exception_diagnostic_information
Diagnostic Information
+
diagnostic_information_what
Frequently Asked Questions
Motivation
throw_exception
diff --git a/doc/diagnostic_information_what.html b/doc/diagnostic_information_what.html new file mode 100644 index 0000000..443c239 --- /dev/null +++ b/doc/diagnostic_information_what.html @@ -0,0 +1,56 @@ + + + + + diagnostic_information_what + + + +
+
+
+
+ +

Boost Exception

+
+ + + +

diagnostic_information_what

+
+

#include <boost/exception/diagnostic_information.hpp> 

+
namespace
+boost
+    {
+    char const * diagnostic_information_what( boost::exception const & e ) throw();
+    }
+

The diagnostic_information_what function is intended to be called from a user-defined std::exception::what() override. This allows diagnostic information to be returned as the what() string.

+

Returns:

+

A pointer to a zero-terminated buffer that contains a string similar to the std::string returned by the diagnostic_information function, or null to indicate a failure.

+

Throws:

+

Nothing.

+

Note:

+

The returned pointer becomes invalid if any error_info is modified or added to the exception object, or if another diagnostic information function is called.

+
+
+ + + + +
+
+
+ + diff --git a/doc/error_info.html b/doc/error_info.html index 9103c9b..d6b21eb 100644 --- a/doc/error_info.html +++ b/doc/error_info.html @@ -76,6 +76,7 @@ typedef boost::error_info<struct tag_errno,int& boost/exception/exception.hpp
boost/exception/info.hpp
diagnostic_information
+
diagnostic_information_what
error_info::error_info
error_info::value
error_info::value_type
diff --git a/doc/exception.html b/doc/exception.html index 76f6ea8..7ad5346 100644 --- a/doc/exception.html +++ b/doc/exception.html @@ -48,6 +48,7 @@ boost
current_exception_diagnostic_information
Diagnostic Information
diagnostic_information
+
diagnostic_information_what
Exception Types as Simple Semantic Tags
enable_current_exception
enable_error_info
diff --git a/doc/functions.html b/doc/functions.html index 377737d..03d6741 100644 --- a/doc/functions.html +++ b/doc/functions.html @@ -28,6 +28,7 @@

current_exception_diagnostic_information

d

diagnostic_information

+

diagnostic_information_what

e

enable_current_exception

enable_error_info

diff --git a/doc/page_idx.html b/doc/page_idx.html index aba1239..fcd540e 100644 --- a/doc/page_idx.html +++ b/doc/page_idx.html @@ -55,6 +55,7 @@

Diagnostic Information

d

diagnostic_information

+

diagnostic_information_what

E

Exception Types as Simple Semantic Tags

e

diff --git a/doc/source/boost-exception.reno b/doc/source/boost-exception.reno index f352cbc..b6b8c08 100644 --- a/doc/source/boost-exception.reno +++ b/doc/source/boost-exception.reno @@ -39,7 +39,7 @@ - 73 + 74 0 @@ -53,21 +53,32 @@ - 0 + 2 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + DF9EA87B0140AACF4422F1B76F6A6A409C15F32858BBBA85A35981A824C56BA9 + 1137981799 + 192 + 9006 - 1 + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 - <string>page index</string> + <string>enable_current_exception</string> - page_idx + @@ -86,322 +97,6 @@ reno_context - - - - - - 1 - 756A81C65A938BEEAD9B576707145748A3DB3BF767CC77ADD5AACD549373856A - 904132245 - 744 - 363 - - - - - - 0 - ../../example/info_tuple.cpp - 0 - 0 - - - - - <string>adding grouped data to exceptions</string> - - - grouping_data - - - - - - 0 - - - - - 0 - - 7 - - reno_context - - - - - - - 2 - CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 - 1114955626 - 11770 - 723 - 1516D0B7E11CBEB60CE4222565ACCAFF2E9857A8A505C1C26E2AE90087250581 - 3624753243 - 279 - 26 - - - - - - 0 - ../../../../boost/exception_ptr.hpp - 0 - 0 - - - - - <string>original_exception_type</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 8 - - reno_context - - - - - - - 2 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - 17E691632123EB67BA67D590B49EB8094F462F5A10A66A1C5438E1867EF1478E - 765399792 - 77 - 5887 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - - <string>exception::~exception</string> - - - exception_destructor - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 9 - - reno_context - - - - - - - 1 - F39D869016327CDFEA720920B2743F47989202BF5814B6556EC54A1B0FE562F8 - 3703518029 - 147 - 323 - - - - - - 0 - ../../../../boost/exception.hpp - 0 - 0 - - - - - <string>boost/exception.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 10 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>using virtual inheritance in exception types</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 11 - - reno_context - - - - - - - 2 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - F3FB15CD82336271C6E875BC620385322777D16F0B7C233300783CE35710CCBF - 3292878997 - 282 - 7275 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - - <string>enable_error_info</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 12 - - reno_context - - - - - - - 1 - DB156E6A8ACB9FB90C8FB110FC25A5FEB14A619F82EEC47FF913373592E5CC3E - 240075319 - 6209 - 412 - - - - - - 0 - ../../example/example_io.cpp - 0 - 0 - - - - - <string>diagnostic_information example</string> - - - - - - - - - 0 - - - - - 0 - - 13 - - reno_context - @@ -436,7 +131,105 @@ 0 - 14 + 7 + + reno_context + + + + + + + 2 + 46AE88799BE7F14F1E2B48F0077193517F25AFFD4AE13C30489247555042EEE3 + 1975649535 + 3970 + 518 + D31BCE814DF5B8B718E7EB67A194AD08EF716A26D422E436596ABA1F145007D8 + 4055211476 + 525 + 3439 + + + + + + 0 + ../../../../boost/exception/info.hpp + 0 + 0 + + + + + <string>exception/operator<<</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 8 + + reno_context + + + + + + + 2 + F7633FDCF6615C0199645701EE6E7ACE5CBCD7A7CF6838573791E91ABB3C09F2 + 1668435395 + 1332 + 396 + A1F443AF571973A12005D2F7D4AE09A32AAF686FEEAE272EC21512A65EB943E8 + 3879093659 + 1300 + 26 + + + + + + 0 + ../../../../boost/exception/info_tuple.hpp + 0 + 0 + + + + + <string>tuple/operator<<</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 9 reno_context @@ -446,9 +239,9 @@ 1 - 21A43755562CB78B3FFCC49F66B457C1FCD659EE98F25BBFA8DDE453EB89DF0E - 2576704708 - 337 + 2CCD2A79129C832AB12435E43BB35DE67318A8940A36530EF83C5E617987D661 + 2091122505 + 699 323 @@ -456,14 +249,14 @@ 0 - ../../../../boost/exception/errinfo_api_function.hpp + ../../../../boost/exception/all.hpp 0 0 - <string>boost/exception/errinfo_api_function.hpp</string> + <string>boost/exception/all.hpp</string> @@ -481,52 +274,7 @@ 0 - 15 - - reno_context - - - - - - - 1 - 21E8093D2AF6946EAE135823066EF38B9DC8870432B44C81E585FF63A72F9903 - 3352783584 - 12170 - 323 - - - - - - 0 - ../../../../boost/exception_ptr.hpp - 0 - 0 - - - - - <string>boost/exception_ptr.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 16 + 10 reno_context @@ -536,288 +284,9 @@ 2 - AEDDD2FA4F47CEBD99444F1054D85AB8132748CF38D6634503D62E9C8AD5FE68 - 1378637100 - 292 - 368 - 892C0239798B84BA2E80DAA70BBEB7BE0B6086A1D0829D0E1937EC1D19E3FF20 - 3349881047 - 89 - 197 - - - - - - 0 - ../../../../boost/exception/errinfo_api_function.hpp - 0 - 0 - - - - - <string>errinfo_api_function</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 17 - - reno_context - - - - - - - 1 - E0BE7EFCD5550582AB95C9EEDA6E68CA0F89B19838DA61876D42161E1EA4AE71 - 2587249979 - 233 - 323 - - - - - - 0 - ../../../../boost/exception/errinfo_at_line.hpp - 0 - 0 - - - - - <string>boost/exception/errinfo_at_line.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 18 - - reno_context - - - - - - - 2 - CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 - 1114955626 - 11770 - 723 - 0066D4E6E6B189906E6DE04F08509F3737511701A1B1355B37511EC18E8371F4 - 2078296250 - 305 - 10862 - - - - - - 0 - ../../../../boost/exception_ptr.hpp - 0 - 0 - - - - - <string>copy_exception</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 19 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>frequently asked questions</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 20 - - reno_context - - - - - - - 2 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - 65D35B8A2063883A53E9D0DCC3FF8E5CA3573A58451A653CDE3003FFBEC576D3 - 1693870740 - 2195 - 3690 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - - <string>exception</string> - - - - - - - - - 1 - 2 - (:include include:) ---- !!!See Also: (:pagelist link="backlink" except_tags="exception,member" mod="w":) - - - - - 0 - - 21 - - reno_context - - - - - - - 2 - CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 - 1114955626 - 11770 - 723 - E23085202D084CBB50F289988A6A592F06D923B77D0AB25D7A98A7188DF5BE3B - 1414247481 - 766 - 10094 - - - - - - 0 - ../../../../boost/exception_ptr.hpp - 0 - 0 - - - - - <string>current_exception</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 22 - - reno_context - - - - - - - 2 - 729C4823568528056026F84642250C2A19F5EC21C6BCA14B482D2C3370F06990 - 2578904403 - 3888 + 46AE88799BE7F14F1E2B48F0077193517F25AFFD4AE13C30489247555042EEE3 + 1975649535 + 3970 518 6E325144EF4F41FA3A225EB30729101382C4E99B3D6160E307311E4B4E641010 1097215175 @@ -854,7 +323,7 @@ 0 - 23 + 11 reno_context @@ -864,59 +333,10 @@ 1 - 95AD55ACCB1C17C1DBA4C309BDFCBD4B66E52CD9A2F54FDAD2D642A00342D001 - 3194412598 - 4599 - 323 - - - - - - 0 - ../../../../boost/exception/diagnostic_information.hpp - 0 - 0 - - - - - <string>boost/exception/diagnostic_information.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 24 - - reno_context - - - - - - - 2 - 6FB85B536F965F137409D5B5D34786DCBF0B9957A7C251D271B717A1156B823D - 1090406464 - 362 - 323 - D16DAEA8B1792A019AF7FCA362FDC6EFD381AF4C43C076A01C029ECE51F994A6 - 3172941848 - 330 - 26 + A14B5595A6DD87562792D402B48500AAD71FA1ABD75C14EDF089FCC7318CBB9B + 3469762901 + 468 + 227 @@ -930,7 +350,7 @@ - <string>current_exception_cast</string> + <string>boost/exception/current_exception_cast.hpp</string> @@ -948,220 +368,7 @@ 0 - 25 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>boost/exception/enable_current_exception.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 26 - - reno_context - - - - - - - 2 - 15CF5BD93D20D62D659C11A69330B06E408398EA488BEF1FD45437AADCDB424E - 1232553666 - 214 - 345 - 6262783847165581298EC9500031E6B7A97B2751A9CEF67C4794121A78142C58 - 3676119191 - 90 - 118 - - - - - - 0 - ../../../../boost/exception/errinfo_file_handle.hpp - 0 - 0 - - - - - <string>errinfo_file_handle</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 27 - - reno_context - - - - - - - 1 - FFF4359EFC66EE6AA729B641F38B4020A55E83A1C099BCA59B1CA9A9875E7F79 - 366628170 - 236 - 323 - - - - - - 0 - ../../../../boost/exception/errinfo_file_handle.hpp - 0 - 0 - - - - - <string>boost/exception/errinfo_file_handle.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 28 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>transporting of exceptions between threads</string> - - - tutorial_exception_ptr - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 29 - - reno_context - - - - - - - 1 - 27ED18F9B6131B084FEF0C9F932B7027AF449E378B5FD7973CD6642263FCAF27 - 2867102400 - 404 - 307 - - - - - - 0 - ../../example/cloning_1.cpp - 0 - 0 - - - - - <string>using enable_current_exception at the time of the throw</string> - - - using_enable_cloning - - - - - - 0 - - - - - 0 - - 30 + 12 reno_context @@ -1171,32 +378,32 @@ 3 - 892ACAF5EB4C2D93ECC578359C6CF16C5DDB159571B19B7EE11CC84ED6828258 - 116592015 - 1062 - 344 - 5D5B59DE2E0728CF19BDD22BF7DE3FADAD08B422B577E0705508F6D9FB6707C7 - 387228411 - 623 - 433 - 98B33BE76679E3A4831241335CD5DFF6F634429F36BABF96C1D4DC2296C5ECC5 - 1584672077 - 208 - 259 + DA1CAA5F6BAB712AD89E8A0B7D83961FCE4AF9FD198791C9F6EA299800A64FAC + 3553871704 + 612 + 1496 + 154AC930BD1FDCADE24CDB07DBD3163CA26378AF4F1D428C34B67D1F68A60891 + 50905072 + 586 + 23 + CD1241D84950468704F3C3F04116B8DA5162A8BEA4364F10951232F49113C5DE + 1658463867 + 121 + 453 0 - ../../../../boost/exception/detail/error_info_impl.hpp + ../../../../boost/throw_exception.hpp 0 0 - <string>error_info::value</string> + <string>configuration macros</string> @@ -1214,144 +421,7 @@ 0 - 31 - - reno_context - - - - - - - 1 - 4D7009F0868C1DF4898EC6ECF9AD2CFEA98E8653B01B066106761807405D4C22 - 1416707852 - 3107 - 323 - - - - - - 0 - ../../../../boost/exception/get_error_info.hpp - 0 - 0 - - - - - <string>boost/exception/get_error_info.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 32 - - reno_context - - - - - - - 2 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - DF9EA87B0140AACF4422F1B76F6A6A409C15F32858BBBA85A35981A824C56BA9 - 1137981799 - 192 - 8964 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - - <string>enable_current_exception</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 33 - - reno_context - - - - - - - 1 - D32E0E4334CE0236B6EDB0EAC484B2DD595860E9FD53701EB5646D62C6A45D4E - 1054670543 - 866 - 306 - - - - - - 0 - ../../example/error_info_2.cpp - 0 - 0 - - - - - <string>adding of arbitrary data to active exception objects</string> - - - adding_data_later - - - - - - 0 - - - - - 0 - - 34 + 13 reno_context @@ -1404,7 +474,7 @@ 0 - 35 + 14 reno_context @@ -1413,29 +483,18 @@ - 2 - CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 - 1114955626 - 11770 - 723 - 6B3B617AC518A2177BDB89656E726B4E4D79577E289130493A61BAE24FB64838 - 3173127726 - 1101 - 2184 + 0 - 0 - ../../../../boost/exception_ptr.hpp - 0 - 0 + 1 - <string>unknown_exception</string> + <string>exception types as simple semantic tags</string> @@ -1453,7 +512,230 @@ 0 - 36 + 15 + + reno_context + + + + + + + 3 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + E8F75513DDED11FD99209774D96C52882C530DC63A1B0527156DF56901DAF5C7 + 1386049295 + 2209 + 3718 + DA154372D8C23BD9EDC30005CA7959CE686D198891097A837D006B5222F04DE9 + 2768248809 + 143 + 60 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + + <string>exception::exception</string> + + + exception_constructors + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 16 + + reno_context + + + + + + + 1 + C95CEF2E9D0BAA1E950509471062916DB849A46A19F7692BA478030E79B338EB + 1917376632 + 706 + 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 + + 17 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>transporting of exceptions between threads</string> + + + tutorial_exception_ptr + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 18 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>boost/exception/enable_current_exception.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 19 + + reno_context + + + + + + + 2 + D58AD357499A5A09FB5D12397CFFC2FFD412AC8A307ABB59C9BC53ACCA3B959D + 2209414553 + 2926 + 504 + 49F40FF20D66B205C908A8F10BC61DE1BC571E4917A5BD0B4115E3F7FE3923FA + 638776689 + 2894 + 26 + + + + + + 0 + ../../../../boost/exception/get_error_info.hpp + 0 + 0 + + + + + <string>get_error_info</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 20 reno_context @@ -1502,7 +784,7 @@ 0 - 37 + 21 reno_context @@ -1511,47 +793,41 @@ - 2 - CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 - 1114955626 - 11770 - 723 - B20A3D4631F3B2415EED1888B65FA33D7AED20F86BE196159D9297AAED115787 - 3293519666 - 117 - 11169 + 1 + D32E0E4334CE0236B6EDB0EAC484B2DD595860E9FD53701EB5646D62C6A45D4E + 1054670543 + 866 + 306 0 - ../../../../boost/exception_ptr.hpp + ../../example/error_info_2.cpp 0 0 - <string>rethrow_exception</string> + <string>adding of arbitrary data to active exception objects</string> - + adding_data_later - 1 - 2 - (:include include:) (:auto also:) + 0 0 - 38 + 22 reno_context @@ -1571,52 +847,7 @@ - <string>Types</string> - - - types - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 39 - - reno_context - - - - - - - 1 - A14B5595A6DD87562792D402B48500AAD71FA1ABD75C14EDF089FCC7318CBB9B - 3469762901 - 468 - 227 - - - - - - 0 - ../../../../boost/exception/current_exception_cast.hpp - 0 - 0 - - - - - <string>boost/exception/current_exception_cast.hpp</string> + <string>frequently asked questions</string> @@ -1634,7 +865,377 @@ 0 - 40 + 23 + + reno_context + + + + + + + 1 + 283AE6BE0920B1882100C426958FDF998DEE10226546B300B45C1A26B242FC25 + 722381934 + 617 + 323 + + + + + + 0 + ../../../../boost/exception/errinfo_errno.hpp + 0 + 0 + + + + + <string>boost/exception/errinfo_errno.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 24 + + reno_context + + + + + + + 1 + 27ED18F9B6131B084FEF0C9F932B7027AF449E378B5FD7973CD6642263FCAF27 + 2867102400 + 404 + 307 + + + + + + 0 + ../../example/cloning_1.cpp + 0 + 0 + + + + + <string>using enable_current_exception at the time of the throw</string> + + + using_enable_cloning + + + + + + 0 + + + + + 0 + + 25 + + reno_context + + + + + + + 1 + 66E0BD9724AB83012F5B35D887E3313960DC0E69B94E0C03CA1F3C85A0D84A5C + 2883671483 + 311 + 306 + + + + + + 0 + ../../example/logging.cpp + 0 + 0 + + + + + <string>diagnostic information</string> + + + tutorial_diagnostic_information + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 26 + + reno_context + + + + + + + 2 + CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 + 1114955626 + 11770 + 723 + 0066D4E6E6B189906E6DE04F08509F3737511701A1B1355B37511EC18E8371F4 + 2078296250 + 305 + 10862 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>copy_exception</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 27 + + reno_context + + + + + + + 2 + E0BE7EFCD5550582AB95C9EEDA6E68CA0F89B19838DA61876D42161E1EA4AE71 + 2587249979 + 233 + 323 + 92AB508A6B1C2A62CB2ACED423BD04BB5A471674B5A51BFC1E6FB1F5C92AF9AA + 2372475309 + 70 + 157 + + + + + + 0 + ../../../../boost/exception/errinfo_at_line.hpp + 0 + 0 + + + + + <string>errinfo_at_line</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 28 + + reno_context + + + + + + + 1 + FFF4359EFC66EE6AA729B641F38B4020A55E83A1C099BCA59B1CA9A9875E7F79 + 366628170 + 236 + 323 + + + + + + 0 + ../../../../boost/exception/errinfo_file_handle.hpp + 0 + 0 + + + + + <string>boost/exception/errinfo_file_handle.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 29 + + reno_context + + + + + + + 2 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + F3FB15CD82336271C6E875BC620385322777D16F0B7C233300783CE35710CCBF + 3292878997 + 282 + 7317 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + + <string>enable_error_info</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 30 + + reno_context + + + + + + + 1 + 66EFC83C830F0B00D0C9399B475099072E2674B3C694F9152645A33E3D7AC303 + 561674611 + 417 + 323 + + + + + + 0 + ../../../../boost/exception/errinfo_file_name.hpp + 0 + 0 + + + + + <string>boost/exception/errinfo_file_name.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 31 reno_context @@ -1683,425 +1284,7 @@ 0 - 41 - - 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 - - - - - 0 - - 42 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>Macros</string> - - - macros - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 43 - - reno_context - - - - - - - 2 - F7633FDCF6615C0199645701EE6E7ACE5CBCD7A7CF6838573791E91ABB3C09F2 - 1668435395 - 1332 - 396 - A1F443AF571973A12005D2F7D4AE09A32AAF686FEEAE272EC21512A65EB943E8 - 3879093659 - 1300 - 26 - - - - - - 0 - ../../../../boost/exception/info_tuple.hpp - 0 - 0 - - - - - <string>tuple/operator<<</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 44 - - reno_context - - - - - - - 3 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - 65D35B8A2063883A53E9D0DCC3FF8E5CA3573A58451A653CDE3003FFBEC576D3 - 1693870740 - 2195 - 3690 - DA154372D8C23BD9EDC30005CA7959CE686D198891097A837D006B5222F04DE9 - 2768248809 - 143 - 60 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - - <string>exception::exception</string> - - - exception_constructors - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 45 - - reno_context - - - - - - - 2 - 729C4823568528056026F84642250C2A19F5EC21C6BCA14B482D2C3370F06990 - 2578904403 - 3888 - 518 - D31BCE814DF5B8B718E7EB67A194AD08EF716A26D422E436596ABA1F145007D8 - 4055211476 - 525 - 3357 - - - - - - 0 - ../../../../boost/exception/info.hpp - 0 - 0 - - - - - <string>exception/operator<<</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 46 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>boost exception</string> - - - boost-exception - - - - - - 1 - 2 - (:include include:) - - - - - 0 - - 47 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>Motivation</string> - - - motivation - - - - - - 7 - 2 - (:include include:) (:auto also explicit=" - 1 - - 0 - - 48 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>exception types as simple semantic tags</string> - - - - - - - - 2 - - 1 - - 0 - - 49 - - reno_context - - - - - - - 1 - C95CEF2E9D0BAA1E950509471062916DB849A46A19F7692BA478030E79B338EB - 1917376632 - 706 - 408 - - - - - - 0 - ../../example/enable_error_info.cpp - 0 - 0 - - - - - <string>integrating boost exception in existing exception class hierarchies</string> - - - tutorial_enable_error_info - - - - - 2 - - 1 - - 0 - - -19 - - - 2 - ":) - - - - - 0 - - -48 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -49 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 50 + 32 reno_context @@ -2146,6 +1329,810 @@ (:include include:) (:auto also:) + + + 0 + + 33 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>boost exception</string> + + + boost-exception + + + + + + 1 + 2 + (:include include:) + + + + + 0 + + 34 + + reno_context + + + + + + + 1 + A95165313334B684C85659D05D3D8EB17F4AF552EDCB3C180AC1F85D18C99CBF + 115507474 + 2037 + 91 + + + + + + 0 + ../../../../boost/throw_exception.hpp + 0 + 0 + + + + + <string>boost/throw_exception.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 35 + + reno_context + + + + + + + 3 + 892ACAF5EB4C2D93ECC578359C6CF16C5DDB159571B19B7EE11CC84ED6828258 + 116592015 + 1062 + 344 + 5D5B59DE2E0728CF19BDD22BF7DE3FADAD08B422B577E0705508F6D9FB6707C7 + 387228411 + 623 + 433 + 98B33BE76679E3A4831241335CD5DFF6F634429F36BABF96C1D4DC2296C5ECC5 + 1584672077 + 208 + 259 + + + + + + 0 + ../../../../boost/exception/detail/error_info_impl.hpp + 0 + 0 + + + + + <string>error_info::value</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 36 + + reno_context + + + + + + + 2 + CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 + 1114955626 + 11770 + 723 + E23085202D084CBB50F289988A6A592F06D923B77D0AB25D7A98A7188DF5BE3B + 1414247481 + 766 + 10094 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>current_exception</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 37 + + reno_context + + + + + + + 2 + 6FB85B536F965F137409D5B5D34786DCBF0B9957A7C251D271B717A1156B823D + 1090406464 + 362 + 323 + D16DAEA8B1792A019AF7FCA362FDC6EFD381AF4C43C076A01C029ECE51F994A6 + 3172941848 + 330 + 26 + + + + + + 0 + ../../../../boost/exception/current_exception_cast.hpp + 0 + 0 + + + + + <string>current_exception_cast</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 38 + + reno_context + + + + + + + 1 + 4EDD3DF2332B6D9D22AC9AD90B850ACC715A24DD466E675014CBED25C63C255F + 4175717823 + 328 + 323 + + + + + + 0 + ../../../../boost/exception/errinfo_type_info_name.hpp + 0 + 0 + + + + + <string>boost/exception/errinfo_type_info_name.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 39 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>using virtual inheritance in exception types</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 40 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>boost/exception/enable_error_info.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 41 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>transporting of arbitrary data to the catch site</string> + + + tutorial_transporting_data + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 42 + + reno_context + + + + + + + 2 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + E8F75513DDED11FD99209774D96C52882C530DC63A1B0527156DF56901DAF5C7 + 1386049295 + 2209 + 3718 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + + <string>exception</string> + + + + + + + + + 1 + 2 + (:include include:) ---- !!!See Also: (:pagelist link="backlink" except_tags="exception,member" mod="w":) + + + + + 0 + + 43 + + reno_context + + + + + + + 2 + 307034E20863A00923777A60D9495B4076B7F917D5B97203025299060F0833E0 + 3948311309 + 396 + 344 + F8ED2052577830AC0C515EC5932BB14445DD5DA714782281FCDB1776961FECB1 + 3880328768 + 82 + 308 + + + + + + 0 + ../../../../boost/exception/errinfo_file_name.hpp + 0 + 0 + + + + + <string>errinfo_file_name</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 44 + + reno_context + + + + + + + 1 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + + <string>boost/exception/exception.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 45 + + reno_context + + + + + + + 2 + DA1CAA5F6BAB712AD89E8A0B7D83961FCE4AF9FD198791C9F6EA299800A64FAC + 3553871704 + 612 + 1496 + 154AC930BD1FDCADE24CDB07DBD3163CA26378AF4F1D428C34B67D1F68A60891 + 50905072 + 586 + 23 + + + + + + 0 + ../../../../boost/throw_exception.hpp + 0 + 0 + + + + + <string>throw_exception</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 46 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>page index</string> + + + page_idx + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 47 + + reno_context + + + + + + + 2 + E08150343DD1B942E2AC7DDB8EE52852BF2E03476430238FCFF49CD2C09E55E6 + 1796675348 + 978 + 4763 + 36688510914673386A7870D1D4970B7D74CF9A4B7226F9E225A5607DCBFB12C4 + 2314308857 + 446 + 110 + + + + + + 0 + ../../../../boost/exception/diagnostic_information.hpp + 0 + 0 + + + + + <string>current_exception_diagnostic_information</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 48 + + reno_context + + + + + + + 2 + 892ACAF5EB4C2D93ECC578359C6CF16C5DDB159571B19B7EE11CC84ED6828258 + 116592015 + 1062 + 344 + 5D5B59DE2E0728CF19BDD22BF7DE3FADAD08B422B577E0705508F6D9FB6707C7 + 387228411 + 623 + 433 + + + + + + 0 + ../../../../boost/exception/detail/error_info_impl.hpp + 0 + 0 + + + + + <string>error_info</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 49 + + reno_context + + + + + + + 1 + 21A43755562CB78B3FFCC49F66B457C1FCD659EE98F25BBFA8DDE453EB89DF0E + 2576704708 + 337 + 323 + + + + + + 0 + ../../../../boost/exception/errinfo_api_function.hpp + 0 + 0 + + + + + <string>boost/exception/errinfo_api_function.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 50 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>Synopsis</string> + + + synopsis + + + + + + 1 + 2 + (:include include:) (:auto also:) + + 0 @@ -2154,6 +2141,100 @@ reno_context + + + + + + 2 + CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 + 1114955626 + 11770 + 723 + B20A3D4631F3B2415EED1888B65FA33D7AED20F86BE196159D9297AAED115787 + 3293519666 + 117 + 11169 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>rethrow_exception</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 52 + + reno_context + + + + + + + 1 + 9A6D5598D65F1C1B5F913007D1CD1A814F3CDAD07D4AF8C468A0716059B2F7CC + 3552995087 + 1405 + 323 + + + + + + 0 + ../../../../boost/exception/info_tuple.hpp + 0 + 0 + + + + + <string>boost/exception/info_tuple.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 53 + + reno_context + @@ -2191,100 +2272,6 @@ (:include include:) (:auto also:) - - - 0 - - 52 - - reno_context - - - - - - - 2 - D57BF77EE44CD2755E24A56DDC3E159716D04A7ABE009AE977D4926EFEC00F73 - 2498368808 - 973 - 3941 - 9432C669E21C649A86AC6DC5A34275B483A7D2D38118A462DF1C1CD7BBE5ED51 - 2535426829 - 441 - 110 - - - - - - 0 - ../../../../boost/exception/diagnostic_information.hpp - 0 - 0 - - - - - <string>current_exception_diagnostic_information</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 53 - - reno_context - - - - - - - 1 - 2CCD2A79129C832AB12435E43BB35DE67318A8940A36530EF83C5E617987D661 - 2091122505 - 699 - 323 - - - - - - 0 - ../../../../boost/exception/all.hpp - 0 - 0 - - - - - <string>boost/exception/all.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - 0 @@ -2298,18 +2285,25 @@ - 0 + 1 + DE766B811244919E8E1EA54FC747A8487BCE57F1AB592932640FC90428B617A5 + 414875037 + 427 + 323 - 1 + 0 + ../../../../boost/exception/errinfo_file_open_mode.hpp + 0 + 0 - <string>boost/exception/enable_error_info.hpp</string> + <string>boost/exception/errinfo_file_open_mode.hpp</string> @@ -2385,25 +2379,29 @@ - 1 - A95165313334B684C85659D05D3D8EB17F4AF552EDCB3C180AC1F85D18C99CBF - 115507474 - 2037 - 91 + 2 + AEDDD2FA4F47CEBD99444F1054D85AB8132748CF38D6634503D62E9C8AD5FE68 + 1378637100 + 292 + 368 + 892C0239798B84BA2E80DAA70BBEB7BE0B6086A1D0829D0E1937EC1D19E3FF20 + 3349881047 + 89 + 197 0 - ../../../../boost/throw_exception.hpp + ../../../../boost/exception/errinfo_api_function.hpp 0 0 - <string>boost/throw_exception.hpp</string> + <string>errinfo_api_function</string> @@ -2430,29 +2428,25 @@ - 2 - 307034E20863A00923777A60D9495B4076B7F917D5B97203025299060F0833E0 - 3948311309 - 396 - 344 - F8ED2052577830AC0C515EC5932BB14445DD5DA714782281FCDB1776961FECB1 - 3880328768 - 82 - 308 + 1 + A2BF537B251039FA1AF972D55F975E8FDDD14F2731A47FBDEBF3E001F7CF5245 + 2585086703 + 4165 + 323 0 - ../../../../boost/exception/errinfo_file_name.hpp + ../../../../boost/exception/info.hpp 0 0 - <string>errinfo_file_name</string> + <string>boost/exception/info.hpp</string> @@ -2463,7 +2457,7 @@ 1 2 - (:include include:) (:auto also:) + (:include include:) (:auto also:) @@ -2480,156 +2474,13 @@ 2 - D58AD357499A5A09FB5D12397CFFC2FFD412AC8A307ABB59C9BC53ACCA3B959D - 2209414553 - 2926 - 504 - 49F40FF20D66B205C908A8F10BC61DE1BC571E4917A5BD0B4115E3F7FE3923FA - 638776689 - 2894 - 26 - - - - - - 0 - ../../../../boost/exception/get_error_info.hpp - 0 - 0 - - - - - <string>get_error_info</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 59 - - reno_context - - - - - - - 2 - DA1CAA5F6BAB712AD89E8A0B7D83961FCE4AF9FD198791C9F6EA299800A64FAC - 3553871704 - 612 - 1496 - 154AC930BD1FDCADE24CDB07DBD3163CA26378AF4F1D428C34B67D1F68A60891 - 50905072 - 586 - 23 - - - - - - 0 - ../../../../boost/throw_exception.hpp - 0 - 0 - - - - - <string>throw_exception</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 60 - - reno_context - - - - - - - 1 - DE766B811244919E8E1EA54FC747A8487BCE57F1AB592932640FC90428B617A5 - 414875037 - 427 - 323 - - - - - - 0 - ../../../../boost/exception/errinfo_file_open_mode.hpp - 0 - 0 - - - - - <string>boost/exception/errinfo_file_open_mode.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 61 - - reno_context - - - - - - - 2 - 02F77B8305279514F37A75FA6454AE750E04E7AA7934D395EFB52BCC7642965E - 430535365 - 3379 + F7554EEA94C796DF4EC724B2F21CFE92B2A7BEF13097D61CE13CE50CE7192313 + 2034584854 + 4201 560 - D08B74734CDA5115D9E47783E2994C2836BE241FB25E589BB4C67F2596727C03 - 24341149 - 3347 + 2973B09697BC6642C8CBECE8C3DD7C429FA1348B67AAAB47E01B9C1292EE3BB2 + 2629550564 + 3677 26 @@ -2662,7 +2513,56 @@ 0 - 62 + 59 + + reno_context + + + + + + + 2 + CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 + 1114955626 + 11770 + 723 + 6B3B617AC518A2177BDB89656E726B4E4D79577E289130493A61BAE24FB64838 + 3173127726 + 1101 + 2184 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>unknown_exception</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 60 reno_context @@ -2705,7 +2605,45 @@ 0 - 63 + 61 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>Macros</string> + + + macros + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 62 reno_context @@ -2715,9 +2653,9 @@ 1 - 283AE6BE0920B1882100C426958FDF998DEE10226546B300B45C1A26B242FC25 - 722381934 - 617 + E0BE7EFCD5550582AB95C9EEDA6E68CA0F89B19838DA61876D42161E1EA4AE71 + 2587249979 + 233 323 @@ -2725,14 +2663,14 @@ 0 - ../../../../boost/exception/errinfo_errno.hpp + ../../../../boost/exception/errinfo_at_line.hpp 0 0 - <string>boost/exception/errinfo_errno.hpp</string> + <string>boost/exception/errinfo_at_line.hpp</string> @@ -2746,6 +2684,44 @@ (:include include:) (:auto also:) + + + 0 + + 63 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>Types</string> + + + types + + + + + + 1 + 2 + (:include include:) (:auto also:) + + 0 @@ -2760,9 +2736,9 @@ 1 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 + 4D7009F0868C1DF4898EC6ECF9AD2CFEA98E8653B01B066106761807405D4C22 + 1416707852 + 3107 323 @@ -2770,14 +2746,14 @@ 0 - ../../../../boost/exception/exception.hpp + ../../../../boost/exception/get_error_info.hpp 0 0 - <string>boost/exception/exception.hpp</string> + <string>boost/exception/get_error_info.hpp</string> @@ -2804,29 +2780,68 @@ - 2 - E0BE7EFCD5550582AB95C9EEDA6E68CA0F89B19838DA61876D42161E1EA4AE71 - 2587249979 - 233 - 323 - 92AB508A6B1C2A62CB2ACED423BD04BB5A471674B5A51BFC1E6FB1F5C92AF9AA - 2372475309 - 70 - 157 + 1 + DB156E6A8ACB9FB90C8FB110FC25A5FEB14A619F82EEC47FF913373592E5CC3E + 240075319 + 6209 + 412 0 - ../../../../boost/exception/errinfo_at_line.hpp + ../../example/example_io.cpp 0 0 - <string>errinfo_at_line</string> + <string>diagnostic_information example</string> + + + + + + + + + 0 + + + + + 0 + + 66 + + reno_context + + + + + + + 1 + 5AD376A17B373BF62FE491E6E7883756836612C74138FFFA15FFF54E7CDBADAA + 20822643 + 5426 + 323 + + + + + + 0 + ../../../../boost/exception/diagnostic_information.hpp + 0 + 0 + + + + + <string>boost/exception/diagnostic_information.hpp</string> @@ -2844,7 +2859,476 @@ 0 - 66 + 67 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>Motivation</string> + + + motivation + + + + + + 7 + 2 + (:include include:) (:auto also explicit=" + 1 + + 0 + + -14 + + + 2 + + 1 + + 0 + + -16 + + + 2 + + 1 + + 0 + + -22 + + + 2 + ":) + + + + + 0 + + 68 + + reno_context + + + + + + + 2 + CEB9022E39DA32E612158FF553D383E13D300D1202CEB754E28B716040EFC414 + 1114955626 + 11770 + 723 + 1516D0B7E11CBEB60CE4222565ACCAFF2E9857A8A505C1C26E2AE90087250581 + 3624753243 + 279 + 26 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>original_exception_type</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 69 + + reno_context + + + + + + + 2 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + 17E691632123EB67BA67D590B49EB8094F462F5A10A66A1C5438E1867EF1478E + 765399792 + 77 + 5929 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + + <string>exception::~exception</string> + + + exception_destructor + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 70 + + reno_context + + + + + + + 1 + F39D869016327CDFEA720920B2743F47989202BF5814B6556EC54A1B0FE562F8 + 3703518029 + 147 + 323 + + + + + + 0 + ../../../../boost/exception.hpp + 0 + 0 + + + + + <string>boost/exception.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 71 + + reno_context + + + + + + + 1 + 21E8093D2AF6946EAE135823066EF38B9DC8870432B44C81E585FF63A72F9903 + 3352783584 + 12170 + 323 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>boost/exception_ptr.hpp</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 72 + + 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 + + + + + 0 + + 73 + + reno_context + + + + + + + 1 + 756A81C65A938BEEAD9B576707145748A3DB3BF767CC77ADD5AACD549373856A + 904132245 + 744 + 363 + + + + + + 0 + ../../example/info_tuple.cpp + 0 + 0 + + + + + <string>adding grouped data to exceptions</string> + + + grouping_data + + + + + + 0 + + + + + 0 + + 74 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>Headers</string> + + + headers + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 75 + + reno_context + + + + + + + 1 + 91CF203512705C8B2CDCBCD1439821CBF93CFC1A4C2EA2CA91F38DAA3F7720B2 + 1769665510 + 1558 + 352 + + + + + + 0 + ../../example/errinfos.cpp + 0 + 0 + + + + + <string>errinfos example</string> + + + + + + + + + 0 + + + + + 0 + + 76 + + reno_context + + + + + + + 2 + 15CF5BD93D20D62D659C11A69330B06E408398EA488BEF1FD45437AADCDB424E + 1232553666 + 214 + 345 + 6262783847165581298EC9500031E6B7A97B2751A9CEF67C4794121A78142C58 + 3676119191 + 90 + 118 + + + + + + 0 + ../../../../boost/exception/errinfo_file_handle.hpp + 0 + 0 + + + + + <string>errinfo_file_handle</string> + + + + + + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 77 reno_context @@ -2893,7 +3377,7 @@ 0 - 67 + 78 reno_context @@ -2903,28 +3387,28 @@ 2 - 892ACAF5EB4C2D93ECC578359C6CF16C5DDB159571B19B7EE11CC84ED6828258 - 116592015 - 1062 - 344 - 5D5B59DE2E0728CF19BDD22BF7DE3FADAD08B422B577E0705508F6D9FB6707C7 - 387228411 - 623 - 433 + F7554EEA94C796DF4EC724B2F21CFE92B2A7BEF13097D61CE13CE50CE7192313 + 2034584854 + 4201 + 560 + 5738DF31DB52E5E8784199058479E798957794147A099D834110FF821C605EE3 + 1133216499 + 490 + 3705 0 - ../../../../boost/exception/detail/error_info_impl.hpp + ../../../../boost/exception/diagnostic_information.hpp 0 0 - <string>error_info</string> + <string>diagnostic_information_what</string> @@ -2935,442 +3419,7 @@ 1 2 - (:include include:) (:auto also:) - - - - - 0 - - 68 - - reno_context - - - - - - - 3 - DA1CAA5F6BAB712AD89E8A0B7D83961FCE4AF9FD198791C9F6EA299800A64FAC - 3553871704 - 612 - 1496 - 154AC930BD1FDCADE24CDB07DBD3163CA26378AF4F1D428C34B67D1F68A60891 - 50905072 - 586 - 23 - CD1241D84950468704F3C3F04116B8DA5162A8BEA4364F10951232F49113C5DE - 1658463867 - 121 - 453 - - - - - - 0 - ../../../../boost/throw_exception.hpp - 0 - 0 - - - - - <string>configuration macros</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 69 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>transporting of arbitrary data to the catch site</string> - - - tutorial_transporting_data - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 70 - - reno_context - - - - - - - 1 - 66EFC83C830F0B00D0C9399B475099072E2674B3C694F9152645A33E3D7AC303 - 561674611 - 417 - 323 - - - - - - 0 - ../../../../boost/exception/errinfo_file_name.hpp - 0 - 0 - - - - - <string>boost/exception/errinfo_file_name.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 71 - - reno_context - - - - - - - 1 - 0A3DA9A448D03ACAC4C613BEB8B1F68E822C970ABF81D7EEE0CF3152623232E0 - 1462319939 - 4083 - 323 - - - - - - 0 - ../../../../boost/exception/info.hpp - 0 - 0 - - - - - <string>boost/exception/info.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 72 - - reno_context - - - - - - - 1 - 4EDD3DF2332B6D9D22AC9AD90B850ACC715A24DD466E675014CBED25C63C255F - 4175717823 - 328 - 323 - - - - - - 0 - ../../../../boost/exception/errinfo_type_info_name.hpp - 0 - 0 - - - - - <string>boost/exception/errinfo_type_info_name.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 73 - - reno_context - - - - - - - 1 - 9A6D5598D65F1C1B5F913007D1CD1A814F3CDAD07D4AF8C468A0716059B2F7CC - 3552995087 - 1405 - 323 - - - - - - 0 - ../../../../boost/exception/info_tuple.hpp - 0 - 0 - - - - - <string>boost/exception/info_tuple.hpp</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 74 - - reno_context - - - - - - - 1 - 66E0BD9724AB83012F5B35D887E3313960DC0E69B94E0C03CA1F3C85A0D84A5C - 2883671483 - 311 - 306 - - - - - - 0 - ../../example/logging.cpp - 0 - 0 - - - - - <string>diagnostic information</string> - - - tutorial_diagnostic_information - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 75 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>Synopsis</string> - - - synopsis - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 76 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>Headers</string> - - - headers - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 77 - - reno_context - - - - - - - 1 - 91CF203512705C8B2CDCBCD1439821CBF93CFC1A4C2EA2CA91F38DAA3F7720B2 - 1769665510 - 1558 - 352 - - - - - - 0 - ../../example/errinfos.cpp - 0 - 0 - - - - - <string>errinfos example</string> - - - - - - - - - 0 + (:include include:) (:auto also:) (:auto also:) @@ -3380,13 +3429,13 @@ def - 78 + 79 reno_layer - 73 + 74 0 @@ -3516,27 +3565,7 @@ - 5 - 2 - [@typedef (:link - 1 - - 0 - - -67 - - - 2 - :)<struct errinfo_api_function_,char const *> (:link - 1 - - 0 - - -16 - - - 2 - :);@] + 0 @@ -3580,9 +3609,18 @@ - 7 + 5 2 - [@class (:link + [@typedef + 1 + + 0 + + -48 + + + 2 + <struct errinfo_errno_,int> 1 0 @@ -3591,25 +3629,7 @@ 2 - :) { protected: (:include - 1 - - 0 - - -44 - - - 2 - decl pre_indent="4":) (:include - 1 - - 0 - - -8 - - - 2 - decl pre_indent="4":) };@] + ;@] @@ -3675,27 +3695,7 @@ - 5 - 2 - [@typedef - 1 - - 0 - - -67 - - - 2 - <struct errinfo_file_handle_,weak_ptr<FILE> > - 1 - - 0 - - -26 - - - 2 - ;@] + 0 @@ -3706,7 +3706,27 @@ - 0 + 5 + 2 + [@typedef + 1 + + 0 + + -48 + + + 2 + <struct errinfo_at_line_,int> + 1 + + 0 + + -27 + + + 2 + ;@] @@ -3761,7 +3781,27 @@ - 0 + 5 + 2 + [@typedef + 1 + + 0 + + -48 + + + 2 + <struct errinfo_type_info_name_,std::string> + 1 + + 0 + + -32 + + + 2 + ;@] @@ -3805,27 +3845,7 @@ - 5 - 2 - [@typedef - 1 - - 0 - - -67 - - - 2 - <struct errinfo_errno_,int> - 1 - - 0 - - -36 - - - 2 - ;@] + 0 @@ -3891,7 +3911,36 @@ - 0 + 7 + 2 + [@class (:link + 1 + + 0 + + -42 + + + 2 + :) { protected: (:include + 1 + + 0 + + -15 + + + 2 + decl pre_indent="4":) (:include + 1 + + 0 + + -69 + + + 2 + decl pre_indent="4":) };@] @@ -3902,7 +3951,27 @@ - 0 + 5 + 2 + [@typedef (:link + 1 + + 0 + + -48 + + + 2 + :)<struct errinfo_file_name_,std::string> (:link + 1 + + 0 + + -43 + + + 2 + :);@] @@ -3957,7 +4026,45 @@ - 0 + 9 + 2 + [@template <class Tag,class T> class (:link + 1 + + 0 + + -48 + + + 2 + :) { public: (:include + 1 + + 0 + + -13 + + + 2 + decl pre_indent="4":) (:include + 1 + + 0 + + -10 + + + 2 + decl pre_indent="4":) (:include + 1 + + 0 + + -35 + + + 2 + decl pre_indent="4":) };@] @@ -3979,27 +4086,7 @@ - 5 - 2 - [@typedef - 1 - - 0 - - -67 - - - 2 - <struct errinfo_type_info_name_,std::string> - 1 - - 0 - - -50 - - - 2 - ;@] + 0 @@ -4065,7 +4152,27 @@ - 0 + 5 + 2 + [@typedef (:link + 1 + + 0 + + -48 + + + 2 + :)<struct errinfo_api_function_,char const *> (:link + 1 + + 0 + + -56 + + + 2 + :);@] @@ -4076,27 +4183,7 @@ - 5 - 2 - [@typedef (:link - 1 - - 0 - - -67 - - - 2 - :)<struct errinfo_file_name_,std::string> (:link - 1 - - 0 - - -57 - - - 2 - :);@] + 0 @@ -4184,27 +4271,7 @@ - 5 - 2 - [@typedef - 1 - - 0 - - -67 - - - 2 - <struct errinfo_at_line_,int> - 1 - - 0 - - -65 - - - 2 - ;@] + 0 @@ -4215,27 +4282,7 @@ - 5 - 2 - [@typedef - 1 - - 0 - - -67 - - - 2 - <struct errinfo_file_open_mode_,std::string> - 1 - - 0 - - -66 - - - 2 - ;@] + 0 @@ -4246,45 +4293,7 @@ - 9 - 2 - [@template <class Tag,class T> class (:link - 1 - - 0 - - -67 - - - 2 - :) { public: (:include - 1 - - 0 - - -34 - - - 2 - decl pre_indent="4":) (:include - 1 - - 0 - - -22 - - - 2 - decl pre_indent="4":) (:include - 1 - - 0 - - -30 - - - 2 - decl pre_indent="4":) };@] + 0 @@ -4383,7 +4392,27 @@ - 0 + 5 + 2 + [@typedef + 1 + + 0 + + -48 + + + 2 + <struct errinfo_file_handle_,weak_ptr<FILE> > + 1 + + 0 + + -76 + + + 2 + ;@] @@ -4393,6 +4422,37 @@ -77 + + 5 + 2 + [@typedef + 1 + + 0 + + -48 + + + 2 + <struct errinfo_file_open_mode_,std::string> + 1 + + 0 + + -77 + + + 2 + ;@] + + + + + 0 + + -78 + + 0 @@ -4404,13 +4464,13 @@ api - 79 + 80 reno_layer - 73 + 74 0 @@ -4462,643 +4522,6 @@ -9 - - 0 - - - - - 0 - - -10 - - - - 0 - - - - - 0 - - -11 - - - - 0 - - - - - 0 - - -12 - - - - 0 - - - - - 0 - - -13 - - - - 0 - - - - - 0 - - -14 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -16 - - - 2 - def:)@] - - - - - 0 - - -15 - - - - 13 - 2 - [@(:include - 1 - - 0 - - -35 - - - 2 - decl:) (:include - 1 - - 0 - - -7 - - - 2 - decl:) (:include - 1 - - 0 - - -55 - - - 2 - decl:) (:include - 1 - - 0 - - -18 - - - 2 - decl:) (:include - 1 - - 0 - - -21 - - - 2 - decl:) (:include - 1 - - 0 - - -37 - - - 2 - decl:)@] - - - - - 0 - - -16 - - - - 0 - - - - - 0 - - -17 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -65 - - - 2 - def:)@] - - - - - 0 - - -18 - - - - 0 - - - - - 0 - - -19 - - - - 0 - - - - - 0 - - -20 - - - - 0 - - - - - 0 - - -21 - - - - 0 - - - - - 0 - - -22 - - - - 0 - - - - - 0 - - -23 - - - - 5 - 2 - [@(:include - 1 - - 0 - - -61 - - - 2 - decl:) (:include - 1 - - 0 - - -52 - - - 2 - decl:)@] - - - - - 0 - - -24 - - - - 0 - - - - - 0 - - -25 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -32 - - - 2 - decl:)@] - - - - - 0 - - -26 - - - - 0 - - - - - 0 - - -27 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -26 - - - 2 - def:)@] - - - - - 0 - - -28 - - - - 0 - - - - - 0 - - -29 - - - - 0 - - - - - 0 - - -30 - - - - 0 - - - - - 0 - - -31 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -58 - - - 2 - decl:)@] - - - - - 0 - - -32 - - - - 0 - - - - - 0 - - -33 - - - - 0 - - - - - 0 - - -34 - - - - 0 - - - - - 0 - - -35 - - - - 0 - - - - - 0 - - -36 - - - - 0 - - - - - 0 - - -37 - - - - 0 - - - - - 0 - - -38 - - - - 0 - - - - - 0 - - -39 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -24 - - - 2 - decl:)@] - - - - - 0 - - -40 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -67 - - - 2 - decl:)@] - - - - - 0 - - -41 - - - - 0 - - - - - 0 - - -42 - - - - 0 - - - - - 0 - - -43 - - - - 0 - - - - - 0 - - -44 - - - - 0 - - - - - 0 - - -45 - - - - 0 - - - - - 0 - - -46 - - - - 0 - - - - - 0 - - -47 - - - - 0 - - - - - 0 - - -48 - - - - 0 - - - - - 0 - - -49 - - - - 0 - - - - - 0 - - -50 - - - - 0 - - - - - 0 - - -51 - - - - 0 - - - - - 0 - - -52 - - - - 0 - - - - - 0 - - -53 - - 29 2 @@ -5107,25 +4530,7 @@ 0 - -23 - - - 2 - :)> #include <(:link - 1 - - 0 - - -40 - - - 2 - :)> #include <(:link - 1 - - 0 - - -64 + -66 2 @@ -5140,6 +4545,42 @@ 2 :)> #include <(:link 1 + + 0 + + -44 + + + 2 + :)> #include <(:link + 1 + + 0 + + -64 + + + 2 + :)> #include <(:link + 1 + + 0 + + -57 + + + 2 + :)> #include <(:link + 1 + + 0 + + -52 + + + 2 + :)> #include <(:link + 1 0 @@ -5152,7 +4593,7 @@ 0 - -73 + -49 2 @@ -5161,7 +4602,7 @@ 0 - -15 + -62 2 @@ -5170,7 +4611,7 @@ 0 - -14 + -23 2 @@ -5179,7 +4620,7 @@ 0 - -17 + -28 2 @@ -5188,7 +4629,7 @@ 0 - -63 + -30 2 @@ -5197,7 +4638,7 @@ 0 - -27 + -54 2 @@ -5206,548 +4647,13 @@ 0 - -70 - - - 2 - :)> #include <(:link - 1 - - 0 - - -60 - - - 2 - :)> #include <(:link - 1 - - 0 - - -72 + -38 2 :)>@] - - - 0 - - -54 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -11 - - - 2 - decl:)@] - - - - - 0 - - -55 - - - - 0 - - - - - 0 - - -56 - - - - 5 - 2 - [@(:include - 1 - - 0 - - -51 - - - 2 - decl:) namespace boost { (:include - 1 - - 0 - - -59 - - - 2 - decl:) }@] - - - - - 0 - - -57 - - - - 0 - - - - - 0 - - -58 - - - - 0 - - - - - 0 - - -59 - - - - 0 - - - - - 0 - - -60 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -66 - - - 2 - def:)@] - - - - - 0 - - -61 - - - - 0 - - - - - 0 - - -62 - - - - 0 - - - - - 0 - - -63 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -36 - - - 2 - def:)@] - - - - - 0 - - -64 - - - - 11 - 2 - [@(:include - 1 - - 0 - - -20 - - - 2 - def:) (:include - 1 - - 0 - - -67 - - - 2 - decl:) typedef (:link - 1 - - 0 - - -67 - - - 2 - :)<struct throw_function_,char const *> throw_function; typedef (:link - 1 - - 0 - - -67 - - - 2 - :)<struct throw_file_,char const *> throw_file; typedef (:link - 1 - - 0 - - -67 - - - 2 - :)<struct throw_line_,int> throw_line;@] - - - - - 0 - - -65 - - - - 0 - - - - - 0 - - -66 - - - - 0 - - - - - 0 - - -67 - - - - 0 - - - - - 0 - - -68 - - - - 0 - - - - - 0 - - -69 - - - - 0 - - - - - 0 - - -70 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -57 - - - 2 - def:)@] - - - - - 0 - - -71 - - - - 5 - 2 - [@(:include - 1 - - 0 - - -67 - - - 2 - def:) (:include - 1 - - 0 - - -45 - - - 2 - decl:)@] - - - - - 0 - - -72 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -50 - - - 2 - def:)@] - - - - - 0 - - -73 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -43 - - - 2 - decl:)@] - - - - - 0 - - -74 - - - - 0 - - - - - 0 - - -75 - - - - 0 - - - - - 0 - - -76 - - - - 0 - - - - - 0 - - -77 - - - - 0 - - - - - - - - decl - - 80 - - reno_layer - - - - 73 - - - 0 - - -5 - - - - 0 - - - - - 0 - - -6 - - - - 0 - - - - - 0 - - -7 - - - - 5 - 2 - [@typedef (:link - 1 - - 0 - - -67 - - - 2 - :)<struct tag_original_exception_type,std::type_info const *> - 1 - - 0 - - -7 - - - 2 - ;@] - - - - - 0 - - -8 - - - - 3 - 2 - [@(:link - 1 - - 0 - - -8 - - - 2 - mod="m":)();@] - - - - - 0 - - -9 - - - - 0 - - 0 @@ -5769,16 +4675,16 @@ 3 2 - [@template <class T> ---unspecified--- (:link + [@(:include 1 0 - -11 + -37 2 - :)( T const & x );@] + decl:)@] @@ -5854,6 +4760,1339 @@ -18 + + 3 + 2 + [@(:include + 1 + + 0 + + -5 + + + 2 + decl:)@] + + + + + 0 + + -19 + + + + 0 + + + + + 0 + + -20 + + + + 0 + + + + + 0 + + -21 + + + + 0 + + + + + 0 + + -22 + + + + 0 + + + + + 0 + + -23 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -20 + + + 2 + def:)@] + + + + + 0 + + -24 + + + + 0 + + + + + 0 + + -25 + + + + 0 + + + + + 0 + + -26 + + + + 0 + + + + + 0 + + -27 + + + + 0 + + + + + 0 + + -28 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -76 + + + 2 + def:)@] + + + + + 0 + + -29 + + + + 0 + + + + + 0 + + -30 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -43 + + + 2 + def:)@] + + + + + 0 + + -31 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -48 + + + 2 + decl:)@] + + + + + 0 + + -32 + + + + 0 + + + + + 0 + + -33 + + + + 0 + + + + + 0 + + -34 + + + + 5 + 2 + [@(:include + 1 + + 0 + + -53 + + + 2 + decl:) namespace boost { (:include + 1 + + 0 + + -45 + + + 2 + decl:) }@] + + + + + 0 + + -35 + + + + 0 + + + + + 0 + + -36 + + + + 0 + + + + + 0 + + -37 + + + + 0 + + + + + 0 + + -38 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -32 + + + 2 + def:)@] + + + + + 0 + + -39 + + + + 0 + + + + + 0 + + -40 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -29 + + + 2 + decl:)@] + + + + + 0 + + -41 + + + + 0 + + + + + 0 + + -42 + + + + 0 + + + + + 0 + + -43 + + + + 0 + + + + + 0 + + -44 + + + + 11 + 2 + [@(:include + 1 + + 0 + + -42 + + + 2 + def:) (:include + 1 + + 0 + + -48 + + + 2 + decl:) typedef (:link + 1 + + 0 + + -48 + + + 2 + :)<struct throw_function_,char const *> throw_function; typedef (:link + 1 + + 0 + + -48 + + + 2 + :)<struct throw_file_,char const *> throw_file; typedef (:link + 1 + + 0 + + -48 + + + 2 + :)<struct throw_line_,int> throw_line;@] + + + + + 0 + + -45 + + + + 0 + + + + + 0 + + -46 + + + + 0 + + + + + 0 + + -47 + + + + 0 + + + + + 0 + + -48 + + + + 0 + + + + + 0 + + -49 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -56 + + + 2 + def:)@] + + + + + 0 + + -50 + + + + 0 + + + + + 0 + + -51 + + + + 0 + + + + + 0 + + -52 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -8 + + + 2 + decl:)@] + + + + + 0 + + -53 + + + + 0 + + + + + 0 + + -54 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -77 + + + 2 + def:)@] + + + + + 0 + + -55 + + + + 0 + + + + + 0 + + -56 + + + + 0 + + + + + 0 + + -57 + + + + 5 + 2 + [@(:include + 1 + + 0 + + -48 + + + 2 + def:) (:include + 1 + + 0 + + -7 + + + 2 + decl:)@] + + + + + 0 + + -58 + + + + 0 + + + + + 0 + + -59 + + + + 0 + + + + + 0 + + -60 + + + + 0 + + + + + 0 + + -61 + + + + 0 + + + + + 0 + + -62 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -27 + + + 2 + def:)@] + + + + + 0 + + -63 + + + + 0 + + + + + 0 + + -64 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -19 + + + 2 + decl:)@] + + + + + 0 + + -65 + + + + 0 + + + + + 0 + + -66 + + + + 5 + 2 + [@(:include + 1 + + 0 + + -58 + + + 2 + decl:) (:include + 1 + + 0 + + -47 + + + 2 + decl:)@] + + + + + 0 + + -67 + + + + 0 + + + + + 0 + + -68 + + + + 0 + + + + + 0 + + -69 + + + + 0 + + + + + 0 + + -70 + + + + 0 + + + + + 0 + + -71 + + + + 13 + 2 + [@(:include + 1 + + 0 + + -59 + + + 2 + decl:) (:include + 1 + + 0 + + -68 + + + 2 + decl:) (:include + 1 + + 0 + + -55 + + + 2 + decl:) (:include + 1 + + 0 + + -26 + + + 2 + decl:) (:include + 1 + + 0 + + -36 + + + 2 + decl:) (:include + 1 + + 0 + + -51 + + + 2 + decl:)@] + + + + + 0 + + -72 + + + + 0 + + + + + 0 + + -73 + + + + 0 + + + + + 0 + + -74 + + + + 0 + + + + + 0 + + -75 + + + + 0 + + + + + 0 + + -76 + + + + 0 + + + + + 0 + + -77 + + + + 0 + + + + + 0 + + -78 + + + + 0 + + + + + + + + decl + + 81 + + reno_layer + + + + 74 + + + 0 + + -5 + + + + 3 + 2 + [@template <class T> ---unspecified--- (:link + 1 + + 0 + + -5 + + + 2 + :)( T const & e );@] + + + + + 0 + + -6 + + + + 0 + + + + + 0 + + -7 + + + + 5 + 2 + [@template <class E, class Tag, class T> E const & (:link + 1 + + 0 + + -7 + + + 2 + mod="/":)( E const & x, (:link + 1 + + 0 + + -48 + + + 2 + :)<Tag,T> const & v );@] + + + + + 0 + + -8 + + + + 7 + 2 + [@template <class E, class Tag1, class T1, ..., class TagN, class TN> E const & (:link + 1 + + 0 + + -8 + + + 2 + mod="/":)( E const & x, (:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)< (:link + 1 + + 0 + + -48 + + + 2 + :)<Tag1,T1>, ..., (:link + 1 + + 0 + + -48 + + + 2 + :)<TagN,TN> > const & v );@] + + + + + 0 + + -9 + + + + 0 + + + + + 0 + + -10 + + + + 5 + 2 + [@(:link + 1 + + 0 + + -10 + + + 2 + mod="m":)( (:link + 1 + + 0 + + -13 + + + 2 + mod="m":) const & v );@] + + + + + 0 + + -11 + + + + 0 + + + + + 0 + + -12 + + + + 0 + + + + + 0 + + -13 + + + + 3 + 2 + [@typedef T (:link + 1 + + 0 + + -13 + + + 2 + mod="m":);@] + + + + + 0 + + -14 + + + + 0 + + + + + 0 + + -15 + + + + 7 + 2 + [@(:link + 1 + + 0 + + -15 + + + 2 + mod="m":)(); (:link + 1 + + 0 + + -15 + + + 2 + mod="m":)( (:link + 1 + + 0 + + -42 + + + 2 + :) const & x );@] + + + + + 0 + + -16 + + + + 0 + + + + + 0 + + -17 + + + + 0 + + + + + 0 + + -18 + + + + 0 + + + + + 0 + + -19 + + + + 1 + 2 + [@template <class ErrorInfo,class E> typename ErrorInfo::(:link error_info::value_type mod="m":) const * (:link get_error_info:)( E const & x ); template <class ErrorInfo,class E> typename ErrorInfo::(:link error_info::value_type mod="m":) * (:link get_error_info:)( E & x );@] + + + + + 0 + + -20 + + + + 0 + + + + + 0 + + -21 + + + + 0 + + + + + 0 + + -22 + + + + 0 + + + + + 0 + + -23 + + + + 0 + + + + + 0 + + -24 + + + + 0 + + + + + 0 + + -25 + + + + 0 + + + + + 0 + + -26 + + 5 2 @@ -5871,163 +6110,13 @@ 0 - -18 + -26 2 :)( T const & e );@] - - - 0 - - -19 - - - - 0 - - - - - 0 - - -20 - - - - 3 - 2 - [@class (:link - 1 - - 0 - - -20 - - - 2 - :);@] - - - - - 0 - - -21 - - - - 5 - 2 - [@(:link - 1 - - 0 - - -55 - - - 2 - :) (:link - 1 - - 0 - - -21 - - - 2 - :)();@] - - - - - 0 - - -22 - - - - 5 - 2 - [@(:link - 1 - - 0 - - -22 - - - 2 - mod="m":)( (:link - 1 - - 0 - - -34 - - - 2 - mod="m":) const & v );@] - - - - - 0 - - -23 - - - - 0 - - - - - 0 - - -24 - - - - 3 - 2 - [@template <class E> E * - 1 - - 0 - - -24 - - - 2 - ();@] - - - - - 0 - - -25 - - - - 0 - - - - - 0 - - -26 - - - - 0 - - 0 @@ -6058,7 +6147,18 @@ - 0 + 3 + 2 + [@template <class T> ---unspecified--- (:link + 1 + + 0 + + -29 + + + 2 + :)( T const & x );@] @@ -6069,45 +6169,7 @@ - 9 - 2 - [@(:link - 1 - - 0 - - -34 - - - 2 - mod="m":) const & (:link - 1 - - 0 - - -30 - - - 2 - mod="m":)() const; (:link - 1 - - 0 - - -34 - - - 2 - mod="m":) & (:link - 1 - - 0 - - -30 - - - 2 - mod="m":)();@] + 0 @@ -6129,18 +6191,7 @@ - 3 - 2 - [@template <class T> ---unspecified--- (:link - 1 - - 0 - - -32 - - - 2 - :)( T const & e );@] + 0 @@ -6162,18 +6213,7 @@ - 3 - 2 - [@typedef T (:link - 1 - - 0 - - -34 - - - 2 - mod="m":);@] + 0 @@ -6184,9 +6224,18 @@ - 5 + 9 2 - [@class (:link + [@(:link + 1 + + 0 + + -13 + + + 2 + mod="m":) const & (:link 1 0 @@ -6195,16 +6244,25 @@ 2 - :): public std::exception public boost:: + mod="m":)() const; (:link 1 0 - -20 + -13 2 - { ---unspecified--- };@] + mod="m":) & (:link + 1 + + 0 + + -35 + + + 2 + mod="m":)();@] @@ -6215,7 +6273,27 @@ - 0 + 5 + 2 + [@(:link + 1 + + 0 + + -55 + + + 2 + :) (:link + 1 + + 0 + + -36 + + + 2 + :)();@] @@ -6226,9 +6304,9 @@ - 5 + 3 2 - [@void (:link + [@template <class E> E * 1 0 @@ -6237,16 +6315,7 @@ 2 - :)( (:link - 1 - - 0 - - -55 - - - 2 - :) const & ep ); + ();@] @@ -6301,7 +6370,18 @@ - 0 + 3 + 2 + [@class (:link + 1 + + 0 + + -42 + + + 2 + :);@] @@ -6312,36 +6392,7 @@ - 7 - 2 - [@template <class E, class Tag1, class T1, ..., class TagN, class TN> E const & (:link - 1 - - 0 - - -43 - - - 2 - mod="/":)( E const & x, (:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)< (:link - 1 - - 0 - - -67 - - - 2 - :)<Tag1,T1>, ..., (:link - 1 - - 0 - - -67 - - - 2 - :)<TagN,TN> > const & v );@] + 0 @@ -6352,36 +6403,7 @@ - 7 - 2 - [@(:link - 1 - - 0 - - -44 - - - 2 - mod="m":)(); (:link - 1 - - 0 - - -44 - - - 2 - mod="m":)( (:link - 1 - - 0 - - -20 - - - 2 - :) const & x );@] + 0 @@ -6394,7 +6416,7 @@ 5 2 - [@template <class E, class Tag, class T> E const & (:link + [@#ifdef BOOST_NO_EXCEPTIONS void (:link 1 0 @@ -6403,16 +6425,16 @@ 2 - mod="/":)( E const & x, (:link + :)( std::exception const & e ); // user defined #else template <class E> void (:link 1 0 - -67 + -45 2 - :)<Tag,T> const & v );@] + :)( E const & e ); #endif@] @@ -6434,7 +6456,18 @@ - 0 + 3 + 2 + [@std::string (:link + 1 + + 0 + + -47 + + + 2 + :)();@] @@ -6445,7 +6478,18 @@ - 0 + 3 + 2 + [@template <class Tag,class T> class (:link + 1 + + 0 + + -48 + + + 2 + :);@] @@ -6478,18 +6522,9 @@ - 19 + 5 2 - [@#if !defined( BOOST_EXCEPTION_DISABLE ) #include <(:link - 1 - - 0 - - -64 - - - 2 - :)> #include <boost/current_function.hpp> #define (:link + [@void (:link 1 0 @@ -6498,70 +6533,16 @@ 2 - :)(x)\ ::boost::(:link + :)( (:link 1 0 - -59 + -55 2 - :)( ::boost::(:link - 1 - - 0 - - -11 - - - 2 - :)(x) <<\ ::boost::(:link - 1 - - 0 - - -64 - - - 2 - |throw_function:)(BOOST_CURRENT_FUNCTION) <<\ ::boost::(:link - 1 - - 0 - - -64 - - - 2 - |throw_file:)(__FILE__) <<\ ::boost::(:link - 1 - - 0 - - -64 - - - 2 - |throw_line:)((int)__LINE__) ) #else #define (:link - 1 - - 0 - - -51 - - - 2 - :)(x) ::boost::(:link - 1 - - 0 - - -59 - - - 2 - :)(x) #endif@] + :) const & ep ); @@ -6572,18 +6553,7 @@ - 3 - 2 - [@std::string (:link - 1 - - 0 - - -52 - - - 2 - :)();@] + 0 @@ -6594,7 +6564,90 @@ - 0 + 19 + 2 + [@#if !defined( BOOST_EXCEPTION_DISABLE ) #include <(:link + 1 + + 0 + + -44 + + + 2 + :)> #include <boost/current_function.hpp> #define (:link + 1 + + 0 + + -53 + + + 2 + :)(x)\ ::boost::(:link + 1 + + 0 + + -45 + + + 2 + :)( ::boost::(:link + 1 + + 0 + + -29 + + + 2 + :)(x) <<\ ::boost::(:link + 1 + + 0 + + -44 + + + 2 + |throw_function:)(BOOST_CURRENT_FUNCTION) <<\ ::boost::(:link + 1 + + 0 + + -44 + + + 2 + |throw_file:)(__FILE__) <<\ ::boost::(:link + 1 + + 0 + + -44 + + + 2 + |throw_line:)((int)__LINE__) ) #else #define (:link + 1 + + 0 + + -53 + + + 2 + :)(x) ::boost::(:link + 1 + + 0 + + -45 + + + 2 + :)(x) #endif@] @@ -6660,9 +6713,36 @@ - 1 + 7 2 - [@template <class ErrorInfo,class E> typename ErrorInfo::(:link error_info::value_type mod="m":) const * (:link get_error_info:)( E const & x ); template <class ErrorInfo,class E> typename ErrorInfo::(:link error_info::value_type mod="m":) * (:link get_error_info:)( E & x );@] + [@template <class E> std::string (:link + 1 + + 0 + + -58 + + + 2 + :)( E const & e ); std::string (:link + 1 + + 0 + + -58 + + + 2 + :)( (:link + 1 + + 0 + + -55 + + + 2 + :) const & p );@] @@ -6675,7 +6755,7 @@ 5 2 - [@#ifdef BOOST_NO_EXCEPTIONS void (:link + [@class (:link 1 0 @@ -6684,16 +6764,16 @@ 2 - :)( std::exception const & e ); // user defined #else template <class E> void (:link + :): public std::exception public boost:: 1 0 - -59 + -42 2 - :)( E const & e ); #endif@] + { ---unspecified--- };@] @@ -6715,36 +6795,7 @@ - 7 - 2 - [@template <class E> std::string (:link - 1 - - 0 - - -61 - - - 2 - :)( E const & e ); std::string (:link - 1 - - 0 - - -61 - - - 2 - :)( - 1 - - 0 - - -55 - - - 2 - const & p );@] + 0 @@ -6810,18 +6861,7 @@ - 3 - 2 - [@template <class Tag,class T> class (:link - 1 - - 0 - - -67 - - - 2 - :);@] + 0 @@ -6832,7 +6872,27 @@ - 0 + 5 + 2 + [@typedef (:link + 1 + + 0 + + -48 + + + 2 + :)<struct tag_original_exception_type,std::type_info const *> + 1 + + 0 + + -68 + + + 2 + ;@] @@ -6843,7 +6903,18 @@ - 0 + 3 + 2 + [@(:link + 1 + + 0 + + -69 + + + 2 + mod="m":)();@] @@ -6934,6 +7005,37 @@ 0 + + + 0 + + -78 + + + + 5 + 2 + [@char const * + 1 + + 0 + + -78 + + + 2 + ( boost:: + 1 + + 0 + + -42 + + + 2 + const & e ) throw();@] + + @@ -6941,13 +7043,13 @@ include - 81 + 82 reno_layer - 73 + 74 0 @@ -6956,134 +7058,9 @@ - 1 + 21 2 - (:auto !:) This is an alphabetical list of all Boost Exception documentation pages. (:pagelist fmt="index" except_tags="index noindex" mod="w":) - - - - - 0 - - -6 - - - - 19 - 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 - 1 - - 0 - - -73 - - - 2 - :)> #include <(:link - 1 - - 0 - - -70 - - - 2 - :)> #include <(:link - 1 - - 0 - - -14 - - - 2 - :)> #include <(:link - 1 - - 0 - - -63 - - - 2 - :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> #include <errno.h> typedef boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)<boost::(:link - 1 - - 0 - - -16 - - - 2 - :),boost::(:link - 1 - - 0 - - -36 - - - 2 - :)> clib_failure; struct file_open_error: virtual boost::(:link - 1 - - 0 - - -20 - - - 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() << boost::(:link - 1 - - 0 - - -57 - - - 2 - :)(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 - - -58 - - - 2 - :). - - - - - 0 - - -7 - - - - 9 - 2 - (:auto !!!:) (:include synopsis:) This - 1 - - 0 - - -67 - - - 2 - typedef is used by - 1 - - 0 - - -21 - - - 2 - if it defaults to returning an + (:auto !!!:) (:include synopsis:) !!!!Requirements: * T must be a class with an accessible no-throw copy constructor. * If T has any virtual base types, those types must have an accessible default 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 @@ -7092,153 +7069,25 @@ 2 - that refers to an object of type + :) support in Boost Exception. For example: [@class my_exception: public std::exception { }; .... throw boost::(:link 1 0 - -35 + -5 2 - , to record in it the std::type_info of the original exception object. - - - - - 0 - - -8 - - - - 3 - 2 - (:auto !!!:) (:include decl:) !!!!Effects: Frees all resources associated with a boost::(:link + :)(my_exception());@] Unless (:link 1 0 - -20 + -5 2 - :) object. !!!!Throws: Nothing. - - - - - 0 - - -9 - - - - 3 - 2 - (:auto !!:) This header has been deprecated. Please #include < - 1 - - 0 - - -53 - - - 2 - > instead. - - - - - 0 - - -10 - - - - 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 - - -20 - - - 2 - :) is used, because it enables exception types to be trivial structs with no members (there's nothing to initialize.) See (:link - 1 - - 0 - - -48 - - - 2 - mod="w":). - - - - - 0 - - -11 - - - - 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 - - -20 - - - 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 - - -20 - - - 2 - :). The T sub-object is initialized from x by the T copy constructor. !!!!Throws: Nothing. - - - - - 0 - - -12 - - - - 11 - 2 - !!!!Example: this is a possible output from the (:link - 1 - - 0 - - -61 - - - 2 - :) function, as used in ''libs/exception/example/example_io.cpp:'' [@example_io.cpp(70): 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<struct fopen_error> std::exception::what: example_io error [struct boost::(:link - 1 - - 0 - - -16 - - - 2 - :)_ *] = fopen [struct boost::(:link + :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link 1 0 @@ -7247,32 +7096,68 @@ 2 - :)_ *] = 2, "No such file or directory" [struct boost::(:link + :) may return an (:link 1 0 - -57 + -55 2 - :)_ *] = tmp1.txt [struct boost::(:link + :) which refers to an instance of (:link 1 0 - -66 + -59 2 - :)_ *] = rb@] + :). See (:link + 1 + + 0 + + -36 + + + 2 + :) for details. !!!!Note: Instead of using the throw keyword directly, it is preferable to call boost::(:link + 1 + + 0 + + -45 + + + 2 + :). This is guaranteed to throw an exception that derives from boost::(:link + 1 + + 0 + + -42 + + + 2 + :) and supports the (:link + 1 + + 0 + + -55 + + + 2 + :) functionality. 0 - -13 + -6 @@ -7285,7 +7170,78 @@ 0 - -14 + -7 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link + 1 + + 0 + + -42 + + + 2 + :), or a type that derives (indirectly) from boost::(:link + 1 + + 0 + + -42 + + + 2 + :). !!!!Postcondition: A copy of v is stored into x. If x already contains data of type (:link + 1 + + 0 + + -48 + + + 2 + :)<Tag,T>, that data is overwritten. Basic exception safety guarantee. !!!!Returns: x. (:include throws:) + + + + + 0 + + -8 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link + 1 + + 0 + + -42 + + + 2 + :), or a type that derives (indirectly) from boost::(:link + 1 + + 0 + + -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:) + + + + + 0 + + -9 @@ -7294,6 +7250,206 @@ (:auto !!:) !!!Synopsis (:include synopsis:) + + + 0 + + -10 + + + + 3 + 2 + (:auto !!!:) (:include synopsis:) !!!!Effects: Stores a copy of v in the + 1 + + 0 + + -48 + + + 2 + object. (:include throws:) + + + + + 0 + + -11 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -12 + + + + 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 + + -19 + + + 2 + :) function template can be called with any exception type. If BOOST_NO_RTTI is defined, (:link + 1 + + 0 + + -19 + + + 2 + :) can be used only with objects of type boost::(:link + 1 + + 0 + + -42 + + + 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 + + -5 + + + 2 + :) and (:link + 1 + + 0 + + -29 + + + 2 + :) are integrated directly in the (:link + 1 + + 0 + + -45 + + + 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 + + -34 + + + 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 + + -45 + + + 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 + + -58 + + + 2 + (of course under BOOST_NO_EXCEPTIONS, the user-defined boost::throw_exception is not allowed to return to the caller.) + + + + + 0 + + -13 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) !!!!Definition: The expression + 1 + + 0 + + -48 + + + 2 + <Tag,T>::(:link + 1 + + 0 + + -13 + + + 2 + mod="m":) evaluates to T. + + + + + 0 + + -14 + + + + 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 @@ -7302,9 +7458,36 @@ - 1 + 7 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (: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 + + -7 + + + 2 + mod="/":), including data that is added at a future time. !!!!Throws: Nothing. @@ -7315,36 +7498,126 @@ - 7 + 27 2 - (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link + (:auto !!:) Some exception hierarchies can not be modified to make boost::(:link 1 0 - -67 + -42 2 - :) instance for transporting the name of a relevant API function (which does not use exceptions to report errors) in exceptions deriving from boost::(:link + :) a base type. In this case, the (:link 1 0 - -20 + -29 2 - :). !!!Example: (:include + :) function template can be used to make exception objects derive from boost::(:link 1 0 - -77 + -42 2 - :) + :) anyway. Here is an example: [@#include <(:link + 1 + + 0 + + -9 + + + 2 + :)> #include <stdexcept> typedef boost::(:link + 1 + + 0 + + -48 + + + 2 + :)<struct tag_std_range_min,size_t> std_range_min; typedef boost::(:link + 1 + + 0 + + -48 + + + 2 + :)<struct tag_std_range_max,size_t> std_range_max; typedef boost::(:link + 1 + + 0 + + -48 + + + 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 + + -29 + + + 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 + + -29 + + + 2 + :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link + 1 + + 0 + + -42 + + + 2 + :) and T. This makes it possible to use (:link + 1 + + 0 + + -7 + + + 2 + mod="/":) 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 + + -42 + + + 2 + :) &, so that (:link + 1 + + 0 + + -41 + + + 2 + |more information can be added to the exception at a later time:). @@ -7355,9 +7628,54 @@ - 1 + 11 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (: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 + + -5 + + + 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 + + -45 + + + 2 + :) are guaranteed to derive from boost::(:link + 1 + + 0 + + -42 + + + 2 + :) and to support cloning. (:include + 1 + + 0 + + -24 + + + 2 + :) (:include + 1 + + 0 + + -72 + + + 2 + :) @@ -7368,27 +7686,9 @@ - 5 + 1 2 - (:auto !!!:) (:include synopsis:) !!!!Effects: As if [@try { throw - 1 - - 0 - - -32 - - - 2 - (e); } catch(...) { return (:link - 1 - - 0 - - -21 - - - 2 - :)(); }@] + (:auto !!!:) !!!Synopsis (:include synopsis:) @@ -7398,6 +7698,207 @@ -19 + + 13 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: * ErrorInfo must be an instance of the (:link + 1 + + 0 + + -48 + + + 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 + + -7 + + + 2 + mod="/":) to store values in exception objects.) When x is destroyed, any pointers returned by (:link + 1 + + 0 + + -19 + + + 2 + :) become invalid. !!!!Throws: Nothing. !!!!Note: The interface of (:link + 1 + + 0 + + -19 + + + 2 + :) may be affected by the build (:link + 1 + + 0 + + -12 + + + 2 + :). + + + + + 0 + + -20 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link + 1 + + 0 + + -48 + + + 2 + :) instance for transporting a relevant errno value in exceptions deriving from boost::(:link + 1 + + 0 + + -42 + + + 2 + :). !!!Example: (:include + 1 + + 0 + + -75 + + + 2 + :) + + + + + 0 + + -21 + + + + 19 + 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. Let's say we have an exception type file_read_error, which takes a file name in its constructor. Consider the following function: [@void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error(????); }@] How can the file_read function pass a file name to the exception type constructor? All it has is a FILE handle. Using boost::(:link + 1 + + 0 + + -42 + + + 2 + :) allows us to free the file_read function from the burden of storing the file name in exceptions it throws: [@`#include <(:link + 1 + + 0 + + -9 + + + 2 + :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <errno.h> struct file_read_error: virtual boost::(:link + 1 + + 0 + + -42 + + + 2 + :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error() << boost::(:link + 1 + + 0 + + -20 + + + 2 + :)(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 + + -9 + + + 2 + :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> 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 + + -42 + + + 2 + :) & e ) { e << boost::(:link + 1 + + 0 + + -43 + + + 2 + :)(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 + + -42 + + + 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 + + -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 + + -22 + + 79 2 @@ -7406,7 +7907,7 @@ 0 - -10 + -39 2 @@ -7415,7 +7916,7 @@ 0 - -20 + -42 2 @@ -7424,7 +7925,7 @@ 0 - -11 + -29 2 @@ -7433,7 +7934,7 @@ 0 - -20 + -42 2 @@ -7442,7 +7943,7 @@ 0 - -67 + -48 2 @@ -7451,7 +7952,7 @@ 0 - -20 + -42 2 @@ -7460,7 +7961,7 @@ 0 - -45 + -7 2 @@ -7469,7 +7970,7 @@ 0 - -20 + -42 2 @@ -7478,7 +7979,7 @@ 0 - -20 + -42 2 @@ -7487,7 +7988,7 @@ 0 - -45 + -7 2 @@ -7496,7 +7997,7 @@ 0 - -20 + -42 2 @@ -7505,7 +8006,7 @@ 0 - -20 + -42 2 @@ -7514,7 +8015,7 @@ 0 - -59 + -45 2 @@ -7523,7 +8024,7 @@ 0 - -20 + -42 2 @@ -7532,7 +8033,7 @@ 0 - -21 + -36 2 @@ -7541,7 +8042,7 @@ 0 - -51 + -53 2 @@ -7550,7 +8051,7 @@ 0 - -59 + -45 2 @@ -7559,7 +8060,7 @@ 0 - -61 + -58 2 @@ -7568,7 +8069,7 @@ 0 - -61 + -58 2 @@ -7577,7 +8078,7 @@ 0 - -51 + -53 2 @@ -7586,7 +8087,7 @@ 0 - -16 + -56 2 @@ -7595,7 +8096,7 @@ 0 - -36 + -20 2 @@ -7604,7 +8105,7 @@ 0 - -57 + -43 2 @@ -7613,7 +8114,7 @@ 0 - -66 + -77 2 @@ -7622,7 +8123,7 @@ 0 - -59 + -45 2 @@ -7631,7 +8132,7 @@ 0 - -20 + -42 2 @@ -7640,7 +8141,7 @@ 0 - -59 + -45 2 @@ -7649,7 +8150,7 @@ 0 - -20 + -42 2 @@ -7667,7 +8168,7 @@ 0 - -32 + -5 2 @@ -7676,7 +8177,7 @@ 0 - -59 + -45 2 @@ -7685,7 +8186,7 @@ 0 - -20 + -42 2 @@ -7694,7 +8195,7 @@ 0 - -67 + -48 2 @@ -7703,7 +8204,7 @@ 0 - -45 + -7 2 @@ -7712,7 +8213,7 @@ 0 - -45 + -7 2 @@ -7721,7 +8222,7 @@ 0 - -45 + -7 2 @@ -7730,7 +8231,7 @@ 0 - -45 + -7 2 @@ -7739,7 +8240,7 @@ 0 - -45 + -7 2 @@ -7748,7 +8249,7 @@ 0 - -67 + -48 2 @@ -7759,13 +8260,62 @@ 0 - -20 + -23 - 13 + 1 2 - (:auto !!!:) (:include synopsis:) Class boost::(:link + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -24 + + + + 15 + 2 + (:auto !!!:) Here is how cloning can be enabled in a throw-expression (15.1): [@#include <(:link + 1 + + 0 + + -57 + + + 2 + :)> #include <(:link + 1 + + 0 + + -23 + + + 2 + :)> #include <stdio.h> #include <errno.h> struct file_read_error: virtual 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 + + -5 + + + 2 + :)(file_read_error()) << boost::(:link 1 0 @@ -7774,43 +8324,38 @@ 2 - :) is designed to be used as a universal base for user-defined exception types. An object of any type deriving from boost::(:link + :)(errno); }@] Of course, (:link 1 0 - -20 + -5 2 - :) can store data of arbitrary types, using the (:link + :) may be used with any exception type; there is no requirement that it should derive from boost::(:link 1 0 - -67 + -42 2 - :) wrapper and (:link - 1 - - 0 - - -45 - - + :). + + + + + 0 + + -25 + + + + 19 2 - mod="/":). To retrieve data from a boost::(:link - 1 - - 0 - - -20 - - - 2 - :) object, use the (:link + (:auto !!:) Boost Exception provides a namespace-scope function (:link 1 0 @@ -7819,14 +8364,621 @@ 2 - :) function template. + :) which takes a boost::(:link + 1 + + 0 + + -42 + + + 2 + :). The returned string contains: *the string representation of all data objects added to the boost::(:link + 1 + + 0 + + -42 + + + 2 + :) through (:link + 1 + + 0 + + -7 + + + 2 + mod="/":); *the output from std::exception::what; *additional platform-specific diagnostic information. The returned string 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 + + -9 + + + 2 + :)> #include <iostream> void f(); //throws unknown types that derive from boost::(:link + 1 + + 0 + + -42 + + + 2 + :). void g() { try { f(); } catch( boost::(:link + 1 + + 0 + + -42 + + + 2 + :) & e ) { std::cerr << (:link + 1 + + 0 + + -58 + + + 2 + :)(e); } }@] (:include + 1 + + 0 + + -65 + + + 2 + :) 0 - -21 + -26 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) !!!!Effects: As if [@try { throw + 1 + + 0 + + -5 + + + 2 + (e); } catch(...) { return (:link + 1 + + 0 + + -36 + + + 2 + :)(); }@] + + + + + 0 + + -27 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link + 1 + + 0 + + -48 + + + 2 + :) instance for transporting a relevant text file line number, for example in parse error exceptions deriving from boost::(:link + 1 + + 0 + + -42 + + + 2 + :). !!!Example: (:include + 1 + + 0 + + -75 + + + 2 + :) + + + + + 0 + + -28 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -29 + + + + 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 + + -42 + + + 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 + + -42 + + + 2 + :). The T sub-object is initialized from x by the T copy constructor. !!!!Throws: Nothing. + + + + + 0 + + -30 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -31 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -32 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard + 1 + + 0 + + -48 + + + 2 + instance for transporting strings returned by std::type_info::name in exceptions deriving from boost:: + 1 + + 0 + + -42 + + + 2 + objects. + + + + + 0 + + -33 + + + + 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 + + -17 + + + 2 + |copying:) of exception objects, implemented non-intrusively and automatically by the boost::(:link + 1 + + 0 + + -45 + + + 2 + :) function. !!Contents #(:link + 1 + + 0 + + -67 + + + 2 + :) #Tutorial ##(:link + 1 + + 0 + + -41 + + + 2 + mod="w":) ##(:link + 1 + + 0 + + -16 + + + 2 + mod="w":) ##(:link + 1 + + 0 + + -17 + + + 2 + mod="w":) ##(:link + 1 + + 0 + + -14 + + + 2 + mod="w":) ##(:link + 1 + + 0 + + -39 + + + 2 + mod="w":) ##(:link + 1 + + 0 + + -25 + + + 2 + mod="w":) #Documentation ##Class (:link + 1 + + 0 + + -42 + + + 2 + :) ##Throwing Exceptions ###(:link + 1 + + 0 + + -53 + + + 2 + :) ###(:link + 1 + + 0 + + -45 + + + 2 + :) ##Transporting of Arbitrary Data to the Catch Site ###(:link + 1 + + 0 + + -48 + + + 2 + :) ###(:link + 1 + + 0 + + -7 + + + 2 + :) ###(:link + 1 + + 0 + + -8 + + + 2 + :) ###(:link + 1 + + 0 + + -19 + + + 2 + :) ###(:link + 1 + + 0 + + -29 + + + 2 + :) ##(:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:) Transporting of Exceptions between Threads ###(:link + 1 + + 0 + + -55 + + + 2 + :) ###(:link + 1 + + 0 + + -5 + + + 2 + :) ###(:link + 1 + + 0 + + -36 + + + 2 + :) ###(:link + 1 + + 0 + + -26 + + + 2 + :) ###(:link + 1 + + 0 + + -51 + + + 2 + :) ###(:link + 1 + + 0 + + -59 + + + 2 + :) ##Diagnostic Information ###(:link + 1 + + 0 + + -58 + + + 2 + :) ###(:link + 1 + + 0 + + -47 + + + 2 + :) ##(:link + 1 + + 0 + + -37 + + + 2 + :) #API ##(:link + 1 + + 0 + + -50 + + + 2 + :) ##(:link + 1 + + 0 + + -74 + + + 2 + :) ##(:link + 1 + + 0 + + -63 + + + 2 + :) ##(:link + 1 + + 0 + + -6 + + + 2 + :) ##(:link + 1 + + 0 + + -61 + + + 2 + :) ##(:link + 1 + + 0 + + -12 + + + 2 + mod="w":) #(:link + 1 + + 0 + + -22 + + + 2 + mod="w":) #(:link + 1 + + 0 + + -46 + + + 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 + + -34 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -35 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) !!!!Description: Returns a (const) reference to the copy of the value passed to (:link + 1 + + 0 + + -48 + + + 2 + :)'s constructor stored in the (:link + 1 + + 0 + + -48 + + + 2 + :) object. !!!!Throws: Nothing. + + + + + 0 + + -36 @@ -7837,7 +8989,7 @@ 0 - -21 + -36 2 @@ -7864,7 +9016,7 @@ 0 - -21 + -36 2 @@ -7873,7 +9025,7 @@ 0 - -21 + -36 2 @@ -7882,7 +9034,7 @@ 0 - -32 + -5 2 @@ -7891,7 +9043,7 @@ 0 - -21 + -36 2 @@ -7909,7 +9061,7 @@ 0 - -35 + -59 2 @@ -7918,7 +9070,7 @@ 0 - -20 + -42 2 @@ -7927,7 +9079,7 @@ 0 - -20 + -42 2 @@ -7936,7 +9088,7 @@ 0 - -20 + -42 2 @@ -7954,7 +9106,7 @@ 0 - -20 + -42 2 @@ -7963,7 +9115,7 @@ 0 - -58 + -19 2 @@ -7972,604 +9124,13 @@ 0 - -7 + -68 2 >. - - - 0 - - -22 - - - - 3 - 2 - (:auto !!!:) (:include synopsis:) !!!!Effects: Stores a copy of v in the - 1 - - 0 - - -67 - - - 2 - object. (:include throws:) - - - - - 0 - - -23 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -24 - - - - 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 - - -25 - - - - 1 - 2 - (:auto !!!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -26 - - - - 7 - 2 - (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link - 1 - - 0 - - -67 - - - 2 - :) instance for transporting a relevant FILE pointer managed by a boost::shared_ptr<FILE> in exceptions deriving from boost::(:link - 1 - - 0 - - -20 - - - 2 - :). !!!Example: (:include - 1 - - 0 - - -77 - - - 2 - :) - - - - - 0 - - -27 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -28 - - - - 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 - - -32 - - - 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 - - -59 - - - 2 - :) are guaranteed to derive from boost::(:link - 1 - - 0 - - -20 - - - 2 - :) and to support cloning. (:include - 1 - - 0 - - -29 - - - 2 - :) (:include - 1 - - 0 - - -41 - - - 2 - :) - - - - - 0 - - -29 - - - - 15 - 2 - (:auto !!!:) Here is how cloning can be enabled in a throw-expression (15.1): [@#include <(:link - 1 - - 0 - - -71 - - - 2 - :)> #include <(:link - 1 - - 0 - - -63 - - - 2 - :)> #include <stdio.h> #include <errno.h> struct file_read_error: virtual boost::(:link - 1 - - 0 - - -20 - - - 2 - :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw boost::(:link - 1 - - 0 - - -32 - - - 2 - :)(file_read_error()) << boost::(:link - 1 - - 0 - - -36 - - - 2 - :)(errno); }@] Of course, (:link - 1 - - 0 - - -32 - - - 2 - :) may be used with any exception type; there is no requirement that it should derive from boost::(:link - 1 - - 0 - - -20 - - - 2 - :). - - - - - 0 - - -30 - - - - 5 - 2 - (:auto !!!:) (:include synopsis:) !!!!Description: Returns a (const) reference to the copy of the value passed to (:link - 1 - - 0 - - -67 - - - 2 - :)'s constructor stored in the (:link - 1 - - 0 - - -67 - - - 2 - :) object. !!!!Throws: Nothing. - - - - - 0 - - -31 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -32 - - - - 21 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: * T must be a class with an accessible no-throw copy constructor. * If T has any virtual base types, those types must have an accessible default 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 - - -55 - - - 2 - :) support in Boost Exception. For example: [@class my_exception: public std::exception { }; .... throw boost::(:link - 1 - - 0 - - -32 - - - 2 - :)(my_exception());@] Unless (:link - 1 - - 0 - - -32 - - - 2 - :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link - 1 - - 0 - - -21 - - - 2 - :) may return an (:link - 1 - - 0 - - -55 - - - 2 - :) which refers to an instance of (:link - 1 - - 0 - - -35 - - - 2 - :). See (:link - 1 - - 0 - - -21 - - - 2 - :) for details. !!!!Note: Instead of using the throw keyword directly, it is preferable to call boost::(:link - 1 - - 0 - - -59 - - - 2 - :). This is guaranteed to throw an exception that derives from boost::(:link - 1 - - 0 - - -20 - - - 2 - :) and supports the (:link - 1 - - 0 - - -55 - - - 2 - :) functionality. - - - - - 0 - - -33 - - - - 19 - 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. Let's say we have an exception type file_read_error, which takes a file name in its constructor. Consider the following function: [@void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error(????); }@] How can the file_read function pass a file name to the exception type constructor? All it has is a FILE handle. Using boost::(:link - 1 - - 0 - - -20 - - - 2 - :) allows us to free the file_read function from the burden of storing the file name in exceptions it throws: [@`#include <(:link - 1 - - 0 - - -53 - - - 2 - :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <errno.h> struct file_read_error: virtual boost::(:link - 1 - - 0 - - -20 - - - 2 - :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error() << boost::(:link - 1 - - 0 - - -36 - - - 2 - :)(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 - - -53 - - - 2 - :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> 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 - - -20 - - - 2 - :) & e ) { e << boost::(:link - 1 - - 0 - - -57 - - - 2 - :)(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 - - -20 - - - 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 - - -20 - - - 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 - - -34 - - - - 5 - 2 - (:auto !!!:) (:include synopsis:) !!!!Definition: The expression - 1 - - 0 - - -67 - - - 2 - <Tag,T>::(:link - 1 - - 0 - - -34 - - - 2 - mod="m":) evaluates to T. - - - - - 0 - - -35 - - - - 5 - 2 - (:auto !!!:) (:include synopsis:) This type is used by the (:link - 1 - - 0 - - -55 - - - 2 - :) support in Boost Exception. Please see (:link - 1 - - 0 - - -21 - - - 2 - :). - - - - - 0 - - -36 - - - - 7 - 2 - (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link - 1 - - 0 - - -67 - - - 2 - :) instance for transporting a relevant errno value in exceptions deriving from boost::(:link - 1 - - 0 - - -20 - - - 2 - :). !!!Example: (:include - 1 - - 0 - - -77 - - - 2 - :) - - 0 @@ -8580,7 +9141,7 @@ 1 2 - (:auto !!!:) (:include synopsis:) !!!!Precondition: ep shall not be null. !!!!Throws: The exception to which ep refers. + (: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. @@ -8593,7 +9154,7 @@ 1 2 - (:auto !!:) (:pagelist fmt="index" tags="type":) + (:auto !!:) !!!Synopsis (:include synopsis:) @@ -8604,9 +9165,27 @@ - 1 + 5 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (: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 + + -14 + + + 2 + mod="w":). @@ -8619,7 +9198,7 @@ 1 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (:auto !!!:) !!!Synopsis (:include synopsis:) @@ -8630,9 +9209,36 @@ - 37 + 11 2 - (:auto !!!:) When you catch an exception, you can call (:link + (:auto !!:) All exception types that derive from boost::(:link + 1 + + 0 + + -42 + + + 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 + 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 + + -60 + + + 2 + :) (:include 1 0 @@ -8641,160 +9247,16 @@ 2 - :) to get an (:link + :) (:include 1 0 - -55 + -73 2 - :) object: [@#include <(:link - 1 - - 0 - - -15 - - - 2 - :)> #include <boost/thread.hpp> #include <boost/bind.hpp> void do_work(); //throws cloning-enabled boost::(:link - 1 - - 0 - - -20 - - - 2 - :)s void worker_thread( boost::(:link - 1 - - 0 - - -55 - - - 2 - :) & error ) { try { do_work(); error = boost::(:link - 1 - - 0 - - -55 - - - 2 - :)(); } catch( ... ) { error = boost::(:link - 1 - - 0 - - -21 - - - 2 - :)(); } }@] In the above example, note that (:link - 1 - - 0 - - -21 - - - 2 - :) captures the original type of the exception object. The exception can be thrown again using the (:link - 1 - - 0 - - -37 - - - 2 - :) function: [@// ...continued void work() { boost::(:link - 1 - - 0 - - -55 - - - 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 - - -37 - - - 2 - :)(error); }@] Note that (:link - 1 - - 0 - - -21 - - - 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 - - -55 - - - 2 - :) points to an instance of std::bad_alloc, or * if (:link - 1 - - 0 - - -32 - - - 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 - - -55 - - - 2 - :) points to an instance of (:link - 1 - - 0 - - -35 - - - 2 - :). Regardless, the use of (:link - 1 - - 0 - - -21 - - - 2 - :) and (:link - 1 - - 0 - - -37 - - - 2 - :) in the above examples is well-formed. + :) @@ -8805,9 +9267,63 @@ - 1 + 13 2 - (:auto !!:) (:pagelist tags="macro":) + (: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 + + -48 + + + 2 + :) wrapper and (:link + 1 + + 0 + + -7 + + + 2 + mod="/":). To retrieve data from a boost::(:link + 1 + + 0 + + -42 + + + 2 + :) object, use the (:link + 1 + + 0 + + -19 + + + 2 + :) function template. @@ -8818,27 +9334,36 @@ - 5 + 7 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link + (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link 1 0 - -20 + -48 2 - :), or a type that derives (indirectly) from boost::(:link + :) instance for transporting a relevant file name in exceptions deriving from boost::(:link 1 0 - -20 + -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:) + :). !!!Example: (:include + 1 + + 0 + + -75 + + + 2 + :) @@ -8849,36 +9374,9 @@ - 7 + 1 2 - (:auto !!!:) (:include decl:) !!!!Effects: * Default constructor: initializes an empty boost::(:link - 1 - - 0 - - -20 - - - 2 - :) object. * Copy constructor: initializes a boost::(:link - 1 - - 0 - - -20 - - - 2 - :) object which shares ownership with x of all data added through (:link - 1 - - 0 - - -45 - - - 2 - mod="/":), including data that is added at a future time. !!!!Throws: Nothing. + (:auto !!:) !!!Synopsis (:include synopsis:) @@ -8889,36 +9387,81 @@ - 7 + 17 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link + (:auto !!!:) (:include synopsis:) !!!!Requirements: E must derive publicly from std::exception. !!!!Effects: * If BOOST_NO_EXCEPTIONS is not defined, boost::(:link 1 0 - -20 + -45 2 - :), or a type that derives (indirectly) from boost::(:link + :)(e) is equivalent to throw boost::(:link 1 0 - -20 + -5 2 - :). !!!!Postcondition: A copy of v is stored into x. If x already contains data of type (:link + :)(boost::(:link 1 0 - -67 + -29 2 - :)<Tag,T>, that data is overwritten. Basic exception safety guarantee. !!!!Returns: x. (:include throws:) + :)(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::(:link + 1 + + 0 + + -45 + + + 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 + + -45 + + + 2 + :) are allowed to assume that the function never returns; therefore, if the user-defined (:link + 1 + + 0 + + -45 + + + 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 + + -19 + + + 2 + , or format an automatic diagnostic message using boost:: + 1 + + 0 + + -58 + + + 2 + . @@ -8929,315 +9472,9 @@ - 69 + 1 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 - - -28 - - - 2 - |copying:) of exception objects, implemented non-intrusively and automatically by the boost::(:link - 1 - - 0 - - -59 - - - 2 - :) function. !!Contents #(:link - 1 - - 0 - - -47 - - - 2 - :) #Tutorial ##(:link - 1 - - 0 - - -69 - - - 2 - mod="w":) ##(:link - 1 - - 0 - - -49 - - - 2 - mod="w":) ##(:link - 1 - - 0 - - -28 - - - 2 - mod="w":) ##(:link - 1 - - 0 - - -48 - - - 2 - mod="w":) ##(:link - 1 - - 0 - - -10 - - - 2 - mod="w":) ##(:link - 1 - - 0 - - -74 - - - 2 - mod="w":) #Documentation ##Class (:link - 1 - - 0 - - -20 - - - 2 - :) ##Throwing Exceptions ###(:link - 1 - - 0 - - -51 - - - 2 - :) ###(:link - 1 - - 0 - - -59 - - - 2 - :) ##Transporting of Arbitrary Data to the Catch Site ###(:link - 1 - - 0 - - -67 - - - 2 - :) ###(:link - 1 - - 0 - - -45 - - - 2 - :) ###(:link - 1 - - 0 - - -43 - - - 2 - :) ###(:link - 1 - - 0 - - -58 - - - 2 - :) ###(:link - 1 - - 0 - - -11 - - - 2 - :) ##(:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:) Transporting of Exceptions between Threads ###(:link - 1 - - 0 - - -55 - - - 2 - :) ###(:link - 1 - - 0 - - -32 - - - 2 - :) ###(:link - 1 - - 0 - - -21 - - - 2 - :) ###(:link - 1 - - 0 - - -18 - - - 2 - :) ###(:link - 1 - - 0 - - -37 - - - 2 - :) ###(:link - 1 - - 0 - - -35 - - - 2 - :) ##Diagnostic Information ###(:link - 1 - - 0 - - -61 - - - 2 - :) ###(:link - 1 - - 0 - - -52 - - - 2 - :) ##(:link - 1 - - 0 - - -24 - - - 2 - :) #API ##(:link - 1 - - 0 - - -75 - - - 2 - :) ##(:link - 1 - - 0 - - -76 - - - 2 - :) ##(:link - 1 - - 0 - - -38 - - - 2 - :) ##(:link - 1 - - 0 - - -13 - - - 2 - :) ##(:link - 1 - - 0 - - -42 - - - 2 - :) ##(:link - 1 - - 0 - - -68 - - - 2 - mod="w":) #(:link - 1 - - 0 - - -19 - - - 2 - mod="w":) #(:link - 1 - - 0 - - -5 - - - 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. + (:auto !:) This is an alphabetical list of all Boost Exception documentation pages. (:pagelist fmt="index" except_tags="index noindex" mod="w":) @@ -9247,404 +9484,6 @@ -47 - - 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 - - -20 - - - 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 - - -20 - - - 2 - :) { }; struct io_error: virtual exception_base { }; struct file_read_error: virtual io_error { }; typedef boost::(:link - 1 - - 0 - - -67 - - - 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 - - -45 - - - 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 - - -20 - - - 2 - :): [@typedef boost::(:link - 1 - - 0 - - -67 - - - 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 - - -20 - - - 2 - :) do_something(); .... } else throw file_open_error() (:link - 1 - - 0 - - -45 - - - 2 - |<<:) errno_code(errno); } catch( boost::(:link - 1 - - 0 - - -20 - - - 2 - :) & e ) { e (:link - 1 - - 0 - - -45 - - - 2 - |<<:) file_name("foo.txt"); throw; }@] Finally here is how the handler retrieves data from exceptions that derive from boost::(:link - 1 - - 0 - - -20 - - - 2 - :): [@catch( io_error & e ) { std::cerr << "I/O Error!\n"; if( std::string const * fn=(:link - 1 - - 0 - - -58 - - - 2 - :)<file_name>(e) ) std::cerr << "File name: " << *fn << "\n"; if( int const * c=(:link - 1 - - 0 - - -58 - - - 2 - :)<errno_code>(e) ) std::cerr << "OS says: " << strerror(*c) << "\n"; }@] In addition, boost::(:link - 1 - - 0 - - -61 - - - 2 - :) can be used to compose an automatic (if not user-friendly) message that contains all of the (:link - 1 - - 0 - - -67 - - - 2 - :) objects added to a boost::(:link - 1 - - 0 - - -20 - - - 2 - :). This is useful for inclusion in logs and other diagnostic objects. - - - - - 0 - - -48 - - - - 7 - 2 - (:auto !!!:) Deriving from boost::(:link - 1 - - 0 - - -20 - - - 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 - - -20 - - - 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 - - -20 - - - 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 - - -49 - - - - 27 - 2 - (:auto !!:) Some exception hierarchies can not be modified to make boost::(:link - 1 - - 0 - - -20 - - - 2 - :) a base type. In this case, the (:link - 1 - - 0 - - -11 - - - 2 - :) function template can be used to make exception objects derive from boost::(:link - 1 - - 0 - - -20 - - - 2 - :) anyway. Here is an example: [@#include <(:link - 1 - - 0 - - -53 - - - 2 - :)> #include <stdexcept> typedef boost::(:link - 1 - - 0 - - -67 - - - 2 - :)<struct tag_std_range_min,size_t> std_range_min; typedef boost::(:link - 1 - - 0 - - -67 - - - 2 - :)<struct tag_std_range_max,size_t> std_range_max; typedef boost::(:link - 1 - - 0 - - -67 - - - 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 - - -11 - - - 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 - - -11 - - - 2 - :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link - 1 - - 0 - - -20 - - - 2 - :) and T. This makes it possible to use (:link - 1 - - 0 - - -45 - - - 2 - mod="/":) 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 - - -20 - - - 2 - :) &, so that (:link - 1 - - 0 - - -69 - - - 2 - |more information can be added to the exception at a later time:). - - - - - 0 - - -50 - - - - 5 - 2 - (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard - 1 - - 0 - - -67 - - - 2 - instance for transporting strings returned by std::type_info::name in exceptions deriving from boost:: - 1 - - 0 - - -20 - - - 2 - objects. - - - - - 0 - - -51 - - - - 7 - 2 - (:auto !!!:) (:include synopsis:) This macro takes an exception object, records BOOST_CURRENT_FUNCTION, __FILE__ and __LINE__ in it, and forwards it to - 1 - - 0 - - -59 - - - 2 - . To recover this information at the catch site, use - 1 - - 0 - - -58 - - - 2 - ; the information is also included in the message returned by - 1 - - 0 - - -61 - - - 2 - . - - - - - 0 - - -52 - - 9 2 @@ -9653,7 +9492,7 @@ 0 - -20 + -42 2 @@ -9662,7 +9501,7 @@ 0 - -61 + -58 2 @@ -9671,7 +9510,7 @@ 0 - -52 + -47 2 @@ -9680,7 +9519,7 @@ 0 - -52 + -47 2 @@ -9691,7 +9530,200 @@ 0 - -53 + -48 + + + + 41 + 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 + + -48 + + + 2 + :)<Tag,T> can be passed to (:link + 1 + + 0 + + -7 + + + 2 + mod="/":) to be stored in objects of type boost::(:link + 1 + + 0 + + -42 + + + 2 + :). !!!!Usage: The header <(:link + 1 + + 0 + + -31 + + + 2 + :)> provides a declaration of the (:link + 1 + + 0 + + -48 + + + 2 + :) template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, for example: [@#include <(:link + 1 + + 0 + + -31 + + + 2 + :)> struct tag_errno; typedef boost::(:link + 1 + + 0 + + -48 + + + 2 + :)<tag_errno,int> errno_info;@] Or, the shorter equivalent: [@#include <(:link + 1 + + 0 + + -31 + + + 2 + :)> typedef boost::(:link + 1 + + 0 + + -48 + + + 2 + :)<struct tag_errno,int> errno_info;@] This errno_info typedef can be passed to (:link + 1 + + 0 + + -7 + + + 2 + mod="/":) (#include <(:link + 1 + + 0 + + -57 + + + 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 + + -7 + + + 2 + |<<:) errno_info(errno);@] It can also be passed to (:link + 1 + + 0 + + -19 + + + 2 + :) (#include <(:link + 1 + + 0 + + -64 + + + 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( int const * e=boost::(:link + 1 + + 0 + + -19 + + + 2 + :)<errno_info>(x) ) .... }@] For convenience and uniformity, Boost Exception defines the following commonly used (:link + 1 + + 0 + + -48 + + + 2 + :) typedefs, ready for use with (:link + 1 + + 0 + + -7 + + + 2 + mod="/":): (:pagelist tags="error_info_instance":) + + + + + 0 + + -49 @@ -9700,6 +9732,409 @@ (:auto !!:) !!!Synopsis (:include synopsis:) + + + 0 + + -50 + + + + 73 + 2 + !!Synopsis List of documented definitions, declarations and includes by header file: `#include <(:link + 1 + + 0 + + -44 + + + 2 + :)> [@(:include + 1 + + 0 + + -44 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -31 + + + 2 + :)> [@(:include + 1 + + 0 + + -31 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -57 + + + 2 + :)> [@(:include + 1 + + 0 + + -57 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -52 + + + 2 + :)> [@(:include + 1 + + 0 + + -52 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -40 + + + 2 + :)> [@(:include + 1 + + 0 + + -40 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -66 + + + 2 + :)> [@(:include + 1 + + 0 + + -66 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -11 + + + 2 + :)> [@(:include + 1 + + 0 + + -11 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -71 + + + 2 + :)> [@(:include + 1 + + 0 + + -71 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -18 + + + 2 + :)> [@(:include + 1 + + 0 + + -18 + + + 2 + synopsis:)@] `#include <(:link + 1 + + 0 + + -34 + + + 2 + :)> [@(:include + 1 + + 0 + + -34 + + + 2 + synopsis:)@] `#include < + 1 + + 0 + + -49 + + + 2 + > (:include + 1 + + 0 + + -49 + + + 2 + synopsis:) `#include < + 1 + + 0 + + -62 + + + 2 + > (:include + 1 + + 0 + + -62 + + + 2 + synopsis:) `#include < + 1 + + 0 + + -23 + + + 2 + > (:include + 1 + + 0 + + -23 + + + 2 + synopsis:) `#include < + 1 + + 0 + + -28 + + + 2 + > (:include + 1 + + 0 + + -28 + + + 2 + synopsis:) `#include < + 1 + + 0 + + -30 + + + 2 + > (:include + 1 + + 0 + + -30 + + + 2 + synopsis:) `#include < + 1 + + 0 + + -54 + + + 2 + > (:include + 1 + + 0 + + -54 + + + 2 + synopsis:) `#include < + 1 + + 0 + + -38 + + + 2 + > (:include + 1 + + 0 + + -38 + + + 2 + synopsis:) `#include < + 1 + + 0 + + -9 + + + 2 + > (:include + 1 + + 0 + + -9 + + + 2 + synopsis:) + + + + + 0 + + -51 + + + + 1 + 2 + (:auto !!!:) (:include synopsis:) !!!!Precondition: ep shall not be null. !!!!Throws: The exception to which ep refers. + + + + + 0 + + -52 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -53 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) This macro takes an exception object, records BOOST_CURRENT_FUNCTION, __FILE__ and __LINE__ in it, and forwards it to + 1 + + 0 + + -45 + + + 2 + . To recover this information at the catch site, use + 1 + + 0 + + -19 + + + 2 + ; the information is also included in the message returned by + 1 + + 0 + + -58 + + + 2 + . + + 0 @@ -9710,7 +10145,7 @@ 1 2 - (:auto !!!:) !!!Synopsis (:include synopsis:) + (:auto !!:) !!!Synopsis (:include synopsis:) @@ -9791,7 +10226,7 @@ 0 - -21 + -36 2 @@ -9800,7 +10235,7 @@ 0 - -37 + -51 2 @@ -9818,7 +10253,7 @@ 0 - -67 + -48 2 @@ -9827,7 +10262,7 @@ 0 - -20 + -42 2 @@ -9842,9 +10277,36 @@ - 1 + 7 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link + 1 + + 0 + + -48 + + + 2 + :) instance for transporting the name of a relevant API function (which does not use exceptions to report errors) in exceptions deriving from boost::(:link + 1 + + 0 + + -42 + + + 2 + :). !!!Example: (:include + 1 + + 0 + + -75 + + + 2 + :) @@ -9855,36 +10317,9 @@ - 7 + 1 2 - (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link - 1 - - 0 - - -67 - - - 2 - :) instance for transporting a relevant file name in exceptions deriving from boost::(:link - 1 - - 0 - - -20 - - - 2 - :). !!!Example: (:include - 1 - - 0 - - -77 - - - 2 - :) + (:auto !!:) !!!Synopsis (:include synopsis:) @@ -9894,171 +10329,6 @@ -58 - - 13 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: * ErrorInfo must be an instance of the (:link - 1 - - 0 - - -67 - - - 2 - :) template. * E must be polymorphic. !!!!Returns: * If dynamic_cast<boost::(:link - 1 - - 0 - - -20 - - - 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 - - -45 - - - 2 - mod="/":) to store values in exception objects.) When x is destroyed, any pointers returned by (:link - 1 - - 0 - - -58 - - - 2 - :) become invalid. !!!!Throws: Nothing. !!!!Note: The interface of (:link - 1 - - 0 - - -58 - - - 2 - :) may be affected by the build (:link - 1 - - 0 - - -68 - - - 2 - :). - - - - - 0 - - -59 - - - - 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 - - -59 - - - 2 - :)(e) is equivalent to throw boost::(:link - 1 - - 0 - - -32 - - - 2 - :)(boost::(:link - 1 - - 0 - - -11 - - - 2 - :)(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::(:link - 1 - - 0 - - -59 - - - 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 - - -59 - - - 2 - :) are allowed to assume that the function never returns; therefore, if the user-defined (:link - 1 - - 0 - - -59 - - - 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 - - -58 - - - 2 - , or format an automatic diagnostic message using boost:: - 1 - - 0 - - -61 - - - 2 - . - - - - - 0 - - -60 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -61 - - 37 2 @@ -10067,7 +10337,7 @@ 0 - -20 + -42 2 @@ -10076,7 +10346,7 @@ 0 - -67 + -48 2 @@ -10085,7 +10355,7 @@ 0 - -20 + -42 2 @@ -10094,7 +10364,7 @@ 0 - -45 + -7 2 @@ -10103,7 +10373,7 @@ 0 - -20 + -42 2 @@ -10112,7 +10382,7 @@ 0 - -61 + -58 2 @@ -10121,7 +10391,7 @@ 0 - -67 + -48 2 @@ -10130,7 +10400,7 @@ 0 - -67 + -48 2 @@ -10139,7 +10409,7 @@ 0 - -67 + -48 2 @@ -10148,7 +10418,7 @@ 0 - -30 + -35 2 @@ -10157,7 +10427,7 @@ 0 - -30 + -35 2 @@ -10166,7 +10436,7 @@ 0 - -61 + -58 2 @@ -10175,11 +10445,11 @@ 0 - -67 + -48 2 - :) object to string, and ''an unspecified stub string value is used without issuing a compile error.'' The + :) object to string, and ''an unspecified stub string value is used without issuing a compile error.'' The (:link 1 0 @@ -10188,39 +10458,39 @@ 2 - overload of + :) overload of (:link 1 0 - -61 + -58 2 - is equivalent to: [@if( p ) try { + :) is equivalent to: [@if( p ) try { (:link 1 0 - -37 + -51 2 - (p); } catch(...) { return + :)(p); } catch(...) { return (:link 1 0 - -52 + -47 2 - (); } else return <unspecified-string-value>;@] !!!!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 + :)(); } else return <unspecified-string-value>;@] !!!!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 - -12 + -65 2 @@ -10231,7 +10501,38 @@ 0 - -62 + -59 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) This type is used by the (:link + 1 + + 0 + + -55 + + + 2 + :) support in Boost Exception. Please see (:link + 1 + + 0 + + -36 + + + 2 + :). + + + + + 0 + + -60 @@ -10242,7 +10543,7 @@ 0 - -53 + -9 2 @@ -10251,7 +10552,7 @@ 0 - -67 + -48 2 @@ -10260,7 +10561,7 @@ 0 - -20 + -42 2 @@ -10269,7 +10570,7 @@ 0 - -67 + -48 2 @@ -10278,7 +10579,7 @@ 0 - -20 + -42 2 @@ -10287,7 +10588,7 @@ 0 - -45 + -7 2 @@ -10296,7 +10597,7 @@ 0 - -58 + -19 2 @@ -10305,13 +10606,39 @@ 0 - -58 + -19 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 + + -61 + + + + 1 + 2 + (:auto !!:) (:pagelist tags="macro":) + + + + + 0 + + -62 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + 0 @@ -10322,7 +10649,7 @@ 1 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (:auto !!:) (:pagelist fmt="index" tags="type":) @@ -10346,18 +10673,27 @@ - 7 + 11 2 - (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link + !!!!Example: this is a possible output from the (:link 1 0 - -67 + -58 2 - :) instance for transporting a relevant text file line number, for example in parse error exceptions deriving from boost::(:link + :) function, as used in ''libs/exception/example/example_io.cpp:'' [@example_io.cpp(70): 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<struct fopen_error> std::exception::what: example_io error [struct boost::(:link + 1 + + 0 + + -56 + + + 2 + :)_ *] = fopen [struct boost::(:link 1 0 @@ -10366,7 +10702,16 @@ 2 - :). !!!Example: (:include + :)_ *] = 2, "No such file or directory" [struct boost::(:link + 1 + + 0 + + -43 + + + 2 + :)_ *] = tmp1.txt [struct boost::(:link 1 0 @@ -10375,7 +10720,7 @@ 2 - :) + :)_ *] = rb@] @@ -10386,36 +10731,9 @@ - 7 + 1 2 - (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link - 1 - - 0 - - -67 - - - 2 - :) instance for transporting the string passed as a second argument to fopen in exceptions indicating fopen failures and deriving from boost::(:link - 1 - - 0 - - -20 - - - 2 - :). !!!Example: (:include - 1 - - 0 - - -77 - - - 2 - :) + (:auto !!:) !!!Synopsis (:include synopsis:) @@ -10426,126 +10744,126 @@ - 41 + 33 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 + (: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 - -67 + -42 2 - :)<Tag,T> can be passed to (:link + :). *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 - -45 + -42 2 - mod="/":) to be stored in objects of type boost::(:link + :) { }; struct io_error: virtual exception_base { }; struct file_read_error: virtual io_error { }; typedef boost::(:link 1 0 - -20 + -48 2 - :). !!!!Usage: The header <(:link + :)<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 - -40 + -7 2 - :)> provides a declaration of the (:link + |<<:) errno_code(errno); .... }@] In a higher exception-neutral context, we add the file name to ''any'' exception that derives from boost::(:link 1 0 - -67 + -42 2 - :) template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, for example: [@#include <(:link + :): [@typedef boost::(:link 1 0 - -40 + -48 2 - :)> struct tag_errno; typedef boost::(:link + :)<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 - -67 + -42 2 - :)<tag_errno,int> errno_info;@] Or, the shorter equivalent: [@#include <(:link + :) do_something(); .... } else throw file_open_error() (:link 1 0 - -40 + -7 2 - :)> typedef boost::(:link + |<<:) errno_code(errno); } catch( boost::(:link 1 0 - -67 + -42 2 - :)<struct tag_errno,int> errno_info;@] This errno_info typedef can be passed to (:link + :) & e ) { e (:link 1 0 - -45 + -7 2 - mod="/":) (#include <(:link + |<<:) file_name("foo.txt"); throw; }@] Finally here is how the handler retrieves data from exceptions that derive from boost::(:link 1 0 - -71 + -42 2 - :)> first) to store an int named tag_errno in exceptions of types that derive from boost::(:link + :): [@catch( io_error & e ) { std::cerr << "I/O Error!\n"; if( std::string const * fn=(:link 1 0 - -20 + -19 2 - :): [@throw file_read_error() (:link + :)<file_name>(e) ) std::cerr << "File name: " << *fn << "\n"; if( int const * c=(:link 1 0 - -45 + -19 2 - |<<:) errno_info(errno);@] It can also be passed to (:link + :)<errno_code>(e) ) std::cerr << "OS says: " << strerror(*c) << "\n"; }@] In addition, boost::(:link 1 0 @@ -10554,61 +10872,25 @@ 2 - :) (#include <(:link + :) can be used to compose an automatic (if not user-friendly) message that contains all of the (:link 1 0 - -31 + -48 2 - :)> first) to retrieve the tag_errno int from a boost::(:link + :) objects added to a boost::(:link 1 0 - -20 + -42 2 - :): [@catch( boost::(:link - 1 - - 0 - - -20 - - - 2 - :) & x ) { if( int const * e=boost::(:link - 1 - - 0 - - -58 - - - 2 - :)<errno_info>(x) ) .... }@] For convenience and uniformity, Boost Exception defines the following commonly used (:link - 1 - - 0 - - -67 - - - 2 - :) typedefs, ready for use with (:link - 1 - - 0 - - -45 - - - 2 - mod="/":): (:pagelist tags="error_info_instance":) + :). This is useful for inclusion in logs and other diagnostic objects. @@ -10619,54 +10901,36 @@ - 19 + 9 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 + (:auto !!!:) (:include synopsis:) This 1 0 - -58 + -48 2 - :) function template can be called with any exception type. If BOOST_NO_RTTI is defined, (:link + typedef is used by 1 0 - -58 + -36 2 - :) can be used only with objects of type boost::(:link + if it defaults to returning an 1 0 - -20 + -55 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 - - -32 - - - 2 - :) and (:link - 1 - - 0 - - -11 - - - 2 - :) are integrated directly in the (:link + that refers to an object of type 1 0 @@ -10675,34 +10939,7 @@ 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 - - -56 - - - 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 - - -59 - - - 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 - - -61 - - - 2 - (of course under BOOST_NO_EXCEPTIONS, the user-defined boost::throw_exception is not allowed to return to the caller.) + , to record in it the std::type_info of the original exception object. @@ -10713,54 +10950,18 @@ - 11 + 3 2 - (:auto !!:) All exception types that derive from boost::(:link + (:auto !!!:) (:include decl:) !!!!Effects: Frees all resources associated with a boost::(:link 1 0 - -20 + -42 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 - 1 - - 0 - - -20 - - - 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 - - -62 - - - 2 - :) (:include - 1 - - 0 - - -33 - - - 2 - :) (:include - 1 - - 0 - - -6 - - - 2 - :) + :) object. !!!!Throws: Nothing. @@ -10771,9 +10972,18 @@ - 1 + 3 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (:auto !!:) This header has been deprecated. Please #include < + 1 + + 0 + + -9 + + + 2 + > instead. @@ -10797,9 +11007,171 @@ - 1 + 37 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (:auto !!!:) When you catch an exception, you can call (:link + 1 + + 0 + + -36 + + + 2 + :) to get an (:link + 1 + + 0 + + -55 + + + 2 + :) object: [@#include <(:link + 1 + + 0 + + -71 + + + 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 + + -55 + + + 2 + :) & error ) { try { do_work(); error = boost::(:link + 1 + + 0 + + -55 + + + 2 + :)(); } catch( ... ) { error = boost::(:link + 1 + + 0 + + -36 + + + 2 + :)(); } }@] In the above example, note that (:link + 1 + + 0 + + -36 + + + 2 + :) captures the original type of the exception object. The exception can be thrown again using the (:link + 1 + + 0 + + -51 + + + 2 + :) function: [@// ...continued void work() { boost::(:link + 1 + + 0 + + -55 + + + 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 + + -51 + + + 2 + :)(error); }@] Note that (:link + 1 + + 0 + + -36 + + + 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 + + -55 + + + 2 + :) points to an instance of std::bad_alloc, or * if (:link + 1 + + 0 + + -5 + + + 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 + + -55 + + + 2 + :) points to an instance of (:link + 1 + + 0 + + -59 + + + 2 + :). Regardless, the use of (:link + 1 + + 0 + + -36 + + + 2 + :) and (:link + 1 + + 0 + + -51 + + + 2 + :) in the above examples is well-formed. @@ -10810,9 +11182,90 @@ - 1 + 19 2 - (:auto !!:) !!!Synopsis (:include synopsis:) + (: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 + + -52 + + + 2 + :)> #include <(:link + 1 + + 0 + + -30 + + + 2 + :)> #include <(:link + 1 + + 0 + + -49 + + + 2 + :)> #include <(:link + 1 + + 0 + + -23 + + + 2 + :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> #include <errno.h> typedef boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)<boost::(:link + 1 + + 0 + + -56 + + + 2 + :),boost::(:link + 1 + + 0 + + -20 + + + 2 + :)> clib_failure; struct file_open_error: virtual boost::(:link + 1 + + 0 + + -42 + + + 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() << boost::(:link + 1 + + 0 + + -43 + + + 2 + :)(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 + + -19 + + + 2 + :). @@ -10822,437 +11275,6 @@ -74 - - 19 - 2 - (:auto !!:) Boost Exception provides a namespace-scope function (:link - 1 - - 0 - - -61 - - - 2 - :) which takes a boost::(:link - 1 - - 0 - - -20 - - - 2 - :). The returned string contains: *the string representation of all data objects added to the boost::(:link - 1 - - 0 - - -20 - - - 2 - :) through (:link - 1 - - 0 - - -45 - - - 2 - mod="/":); *the output from std::exception::what; *additional platform-specific diagnostic information. The returned string 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 - - -53 - - - 2 - :)> #include <iostream> void f(); //throws unknown types that derive from boost::(:link - 1 - - 0 - - -20 - - - 2 - :). void g() { try { f(); } catch( boost::(:link - 1 - - 0 - - -20 - - - 2 - :) & e ) { std::cerr << (:link - 1 - - 0 - - -61 - - - 2 - :)(e); } }@] (:include - 1 - - 0 - - -12 - - - 2 - :) - - - - - 0 - - -75 - - - - 73 - 2 - !!Synopsis List of documented definitions, declarations and includes by header file: `#include <(:link - 1 - - 0 - - -64 - - - 2 - :)> [@(:include - 1 - - 0 - - -64 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -40 - - - 2 - :)> [@(:include - 1 - - 0 - - -40 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -71 - - - 2 - :)> [@(:include - 1 - - 0 - - -71 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -73 - - - 2 - :)> [@(:include - 1 - - 0 - - -73 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -54 - - - 2 - :)> [@(:include - 1 - - 0 - - -54 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -23 - - - 2 - :)> [@(:include - 1 - - 0 - - -23 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -39 - - - 2 - :)> [@(:include - 1 - - 0 - - -39 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -15 - - - 2 - :)> [@(:include - 1 - - 0 - - -15 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -25 - - - 2 - :)> [@(:include - 1 - - 0 - - -25 - - - 2 - synopsis:)@] `#include <(:link - 1 - - 0 - - -56 - - - 2 - :)> [@(:include - 1 - - 0 - - -56 - - - 2 - synopsis:)@] `#include < - 1 - - 0 - - -14 - - - 2 - > (:include - 1 - - 0 - - -14 - - - 2 - synopsis:) `#include < - 1 - - 0 - - -17 - - - 2 - > (:include - 1 - - 0 - - -17 - - - 2 - synopsis:) `#include < - 1 - - 0 - - -63 - - - 2 - > (:include - 1 - - 0 - - -63 - - - 2 - synopsis:) `#include < - 1 - - 0 - - -27 - - - 2 - > (:include - 1 - - 0 - - -27 - - - 2 - synopsis:) `#include < - 1 - - 0 - - -70 - - - 2 - > (:include - 1 - - 0 - - -70 - - - 2 - synopsis:) `#include < - 1 - - 0 - - -60 - - - 2 - > (:include - 1 - - 0 - - -60 - - - 2 - synopsis:) `#include < - 1 - - 0 - - -72 - - - 2 - > (:include - 1 - - 0 - - -72 - - - 2 - synopsis:) `#include < - 1 - - 0 - - -53 - - - 2 - > (:include - 1 - - 0 - - -53 - - - 2 - synopsis:) - - - - - 0 - - -76 - - 1 2 @@ -11263,7 +11285,7 @@ 0 - -77 + -75 @@ -11274,7 +11296,7 @@ 0 - -14 + -49 2 @@ -11283,7 +11305,7 @@ 0 - -17 + -62 2 @@ -11292,7 +11314,7 @@ 0 - -63 + -23 2 @@ -11301,7 +11323,7 @@ 0 - -27 + -28 2 @@ -11310,7 +11332,7 @@ 0 - -70 + -30 2 @@ -11319,66 +11341,12 @@ 0 - -60 + -54 2 > #include < 1 - - 0 - - -71 - - - 2 - > #include < - 1 - - 0 - - -56 - - - 2 - > #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <stdio.h> #include <errno.h> #include <exception> struct error : virtual std::exception, virtual boost:: - 1 - - 0 - - -20 - - - 2 - { }; struct file_error : virtual error { }; struct file_open_error: virtual file_error { }; struct file_read_error: virtual file_error { }; boost::shared_ptr<FILE> open_file( char const * file, char const * mode ) { if( FILE * f=fopen(file,mode) ) return boost::shared_ptr<FILE>(f,fclose); else - 1 - - 0 - - -51 - - - 2 - ( file_open_error() << boost:: - 1 - - 0 - - -16 - - - 2 - ("fopen") << boost:: - 1 - - 0 - - -36 - - - 2 - (errno) << boost:: - 1 0 @@ -11386,39 +11354,48 @@ 2 - (file) << boost:: + > #include < 1 0 - -66 + -34 2 - (mode) ); } size_t read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size ) { size_t nr=fread(buf,1,size,f.get()); if( ferror(f.get()) ) + > #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <stdio.h> #include <errno.h> #include <exception> struct error : virtual std::exception, virtual boost:: 1 0 - -51 + -42 2 - ( file_read_error() << boost:: + { }; struct file_error : virtual error { }; struct file_open_error: virtual file_error { }; struct file_read_error: virtual file_error { }; boost::shared_ptr<FILE> open_file( char const * file, char const * mode ) { if( FILE * f=fopen(file,mode) ) return boost::shared_ptr<FILE>(f,fclose); else 1 0 - -16 + -53 2 - ("fread") << boost:: + ( file_open_error() << boost:: 1 0 - -36 + -56 + + + 2 + ("fopen") << boost:: + 1 + + 0 + + -20 2 @@ -11427,13 +11404,178 @@ 0 - -26 + -43 + + + 2 + (file) << boost:: + 1 + + 0 + + -77 + + + 2 + (mode) ); } size_t read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size ) { size_t nr=fread(buf,1,size,f.get()); if( ferror(f.get()) ) + 1 + + 0 + + -53 + + + 2 + ( file_read_error() << boost:: + 1 + + 0 + + -56 + + + 2 + ("fread") << boost:: + 1 + + 0 + + -20 + + + 2 + (errno) << boost:: + 1 + + 0 + + -76 2 (f) ); return nr; }@] + + + 0 + + -76 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link + 1 + + 0 + + -48 + + + 2 + :) instance for transporting a relevant FILE pointer managed by a boost::shared_ptr<FILE> in exceptions deriving from boost::(:link + 1 + + 0 + + -42 + + + 2 + :). !!!Example: (:include + 1 + + 0 + + -75 + + + 2 + :) + + + + + 0 + + -77 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) This type is designed to be used as a standard (:link + 1 + + 0 + + -48 + + + 2 + :) instance for transporting the string passed as a second argument to fopen in exceptions indicating fopen failures and deriving from boost::(:link + 1 + + 0 + + -42 + + + 2 + :). !!!Example: (:include + 1 + + 0 + + -75 + + + 2 + :) + + + + + 0 + + -78 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) The + 1 + + 0 + + -78 + + + 2 + function is intended to be called from a user-defined std::exception::what() override. This allows diagnostic information to be returned as the what() string. !!!!Returns: A pointer to a zero-terminated buffer that contains a string similar to the std::string returned by the + 1 + + 0 + + -58 + + + 2 + function, or null to indicate a failure. !!!!Throws: Nothing. !!!!Note: The returned pointer becomes invalid if any + 1 + + 0 + + -48 + + + 2 + is modified or added to the exception object, or if another diagnostic information function is called. + + @@ -11441,13 +11583,13 @@ throws - 82 + 83 reno_layer - 73 + 74 0 @@ -11478,7 +11620,9 @@ - 0 + 1 + 2 + !!!!Throws: std::bad_alloc, or any exception emitted by the T copy constructor. @@ -11489,7 +11633,9 @@ - 0 + 1 + 2 + !!!!Throws: std::bad_alloc, or any exception emitted by T1..TN copy constructor. @@ -11511,7 +11657,9 @@ - 0 + 1 + 2 + !!!!Throws: Any exception emitted by v's copy constructor. @@ -11643,9 +11791,7 @@ - 1 - 2 - !!!!Throws: Any exception emitted by v's copy constructor. + 0 @@ -11876,9 +12022,7 @@ - 1 - 2 - !!!!Throws: std::bad_alloc, or any exception emitted by T1..TN copy constructor. + 0 @@ -11900,9 +12044,7 @@ - 1 - 2 - !!!!Throws: std::bad_alloc, or any exception emitted by the T copy constructor. + 0 @@ -12257,6 +12399,17 @@ 0 + + + 0 + + -78 + + + + 0 + + @@ -12264,13 +12417,13 @@ synopsis - 83 + 84 reno_layer - 73 + 74 0 @@ -12279,7 +12432,18 @@ - 0 + 3 + 2 + `#include < + 1 + + 0 + + -18 + + + 2 + > [@namespace boost { (:include decl pre_indent="4":) }@] @@ -12303,16 +12467,16 @@ 3 2 - `#include < + `#include <(:link 1 0 - -15 + -57 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] + :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] @@ -12323,7 +12487,27 @@ - 0 + 5 + 2 + `#include <(:link + 1 + + 0 + + -52 + + + 2 + :)> [@namespace boost { (:include + 1 + + 0 + + -8 + + + 2 + decl pre_indent="4":) }@] @@ -12334,7 +12518,9 @@ - 0 + 1 + 2 + [@(:include api:)@] @@ -12345,7 +12531,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -57 + + + 2 + :)> [@(:include decl:)@] @@ -12356,18 +12553,9 @@ - 3 + 1 2 - `#include < - 1 - - 0 - - -54 - - - 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] + [@namespace boost { (:include api pre_indent="4":) }@] @@ -12389,7 +12577,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -57 + + + 2 + :)> [@(:include decl:)@] @@ -12400,18 +12599,7 @@ - 3 - 2 - [@#include <(:link - 1 - - 0 - - -40 - - - 2 - :)> namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -12422,18 +12610,7 @@ - 3 - 2 - [@#include <(:link - 1 - - 0 - - -64 - - - 2 - :)> namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -12444,27 +12621,7 @@ - 5 - 2 - `#include < - 1 - - 0 - - -14 - - - 2 - > (:include - 1 - - 0 - - -14 - - - 2 - synopsis:) + 0 @@ -12475,18 +12632,7 @@ - 3 - 2 - [@#include < - 1 - - 0 - - -40 - - - 2 - > namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -12499,16 +12645,16 @@ 3 2 - `#include <(:link + [@#include < 1 0 - -15 + -44 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] + > namespace boost { (:include api pre_indent="4":) }@] @@ -12519,7 +12665,9 @@ - 0 + 1 + 2 + [@namespace boost { (:include decl pre_indent="4":) }@] @@ -12530,18 +12678,27 @@ - 3 + 5 2 - `#include <(:link + `#include < 1 0 - -64 + -23 2 - :)> [@namespace boost { (:include def pre_indent="4":) }@] + > (:include + 1 + + 0 + + -23 + + + 2 + synopsis:) @@ -12552,18 +12709,7 @@ - 3 - 2 - `#include <(:link - 1 - - 0 - - -15 - - - 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] + 0 @@ -12574,18 +12720,7 @@ - 3 - 2 - `#include <(:link - 1 - - 0 - - -71 - - - 2 - :)> [@(:include decl:)@] + 0 @@ -12598,16 +12733,16 @@ 3 2 - [@#include <string> namespace boost { (:include + [@#include < 1 0 - -20 + -31 2 - decl pre_indent="4":) (:include api pre_indent="4":) }@] + > #include <errno.h> namespace boost { (:include api pre_indent="4":) }@] @@ -12618,18 +12753,7 @@ - 3 - 2 - `#include < - 1 - - 0 - - -39 - - - 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] + 0 @@ -12640,18 +12764,7 @@ - 3 - 2 - [@#include < - 1 - - 0 - - -64 - - - 2 - > namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -12661,81 +12774,6 @@ -26 - - 5 - 2 - `#include < - 1 - - 0 - - -27 - - - 2 - > (:include - 1 - - 0 - - -27 - - - 2 - synopsis:) - - - - - 0 - - -27 - - - - 3 - 2 - [@#include < - 1 - - 0 - - -40 - - - 2 - > namespace boost { template <class> class weak_ptr; (:include api pre_indent="4":) }@] - - - - - 0 - - -28 - - - - 0 - - - - - 0 - - -29 - - - - 0 - - - - - 0 - - -30 - - 3 2 @@ -12748,7 +12786,104 @@ 2 - :)> [@(:include decl:)@] + :)> [@namespace boost { (:include decl pre_indent="4":) }@] + + + + + 0 + + -27 + + + + 5 + 2 + `#include < + 1 + + 0 + + -62 + + + 2 + > (:include + 1 + + 0 + + -62 + + + 2 + synopsis:) + + + + + 0 + + -28 + + + + 3 + 2 + [@#include < + 1 + + 0 + + -31 + + + 2 + > namespace boost { template <class> class weak_ptr; (:include api pre_indent="4":) }@] + + + + + 0 + + -29 + + + + 3 + 2 + `#include < + 1 + + 0 + + -40 + + + 2 + > [@namespace boost { (:include decl pre_indent="4":) }@] + + + + + 0 + + -30 + + + + 3 + 2 + [@#include <(:link + 1 + + 0 + + -31 + + + 2 + :)> #include <string> namespace boost { (:include api pre_indent="4":) }@] @@ -12761,7 +12896,7 @@ 1 2 - [@#include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] + [@namespace boost { (:include api pre_indent="4":) }@] @@ -12772,18 +12907,27 @@ - 3 + 5 2 `#include < 1 0 - -25 + -38 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] + > (:include + 1 + + 0 + + -38 + + + 2 + synopsis:) @@ -12805,18 +12949,9 @@ - 3 + 1 2 - `#include <(:link - 1 - - 0 - - -71 - - - 2 - :)> [@(:include decl:)@] + (:include api:) @@ -12834,11 +12969,11 @@ 0 - -15 + -57 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] + :)> [@(:include decl:)@] @@ -12849,27 +12984,18 @@ - 5 + 3 2 - `#include < + `#include <(:link 1 0 - -63 + -71 2 - > (:include - 1 - - 0 - - -63 - - - 2 - synopsis:) + :)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -12882,16 +13008,16 @@ 3 2 - `#include <(:link + `#include < 1 0 - -15 + -11 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] + > [@namespace boost { (:include decl pre_indent="4":) }@] @@ -12902,7 +13028,18 @@ - 0 + 3 + 2 + [@#include < + 1 + + 0 + + -31 + + + 2 + > #include <string> namespace boost { (:include api pre_indent="4":) }@] @@ -12913,9 +13050,7 @@ - 1 - 2 - [@namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -12926,9 +13061,18 @@ - 1 + 3 2 - [@namespace boost { (:include api pre_indent="4":) }@] + [@#include < + 1 + + 0 + + -44 + + + 2 + > namespace boost { (:include api pre_indent="4":) }@] @@ -12950,7 +13094,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -44 + + + 2 + :)> [@namespace boost { (:include def pre_indent="4":) }@] @@ -12968,20 +13123,20 @@ 0 - -73 + -30 2 - :)> [@namespace boost { (:include + :)> (:include 1 0 - -43 + -30 2 - decl pre_indent="4":) }@] + synopsis:) @@ -12992,7 +13147,9 @@ - 0 + 1 + 2 + [@namespace boost { (:include api pre_indent="4":) }@] @@ -13010,11 +13167,11 @@ 0 - -71 + -34 2 - :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] + :)> [@namespace boost { (:include decl:) }@] @@ -13036,7 +13193,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -66 + + + 2 + :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] @@ -13047,7 +13215,18 @@ - 0 + 3 + 2 + `#include <(:link + 1 + + 0 + + -57 + + + 2 + :)> [@namespace boost { (:include def pre_indent="4":) }@] @@ -13058,7 +13237,18 @@ - 0 + 3 + 2 + [@#include <(:link + 1 + + 0 + + -31 + + + 2 + :)> namespace boost { (:include api pre_indent="4":) }@] @@ -13069,27 +13259,7 @@ - 5 - 2 - `#include < - 1 - - 0 - - -72 - - - 2 - > (:include - 1 - - 0 - - -72 - - - 2 - synopsis:) + 0 @@ -13102,16 +13272,16 @@ 3 2 - `#include < + `#include <(:link 1 0 - -56 + -71 2 - > (:include decl:) + :)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -13124,16 +13294,16 @@ 3 2 - `#include <(:link + [@#include < 1 0 - -23 + -57 2 - :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] + > #include <boost/tuple/tuple.hpp> namespace boost { (:include api pre_indent="4":) }@] @@ -13144,9 +13314,18 @@ - 1 + 3 2 - [@(:include api:)@] + `#include < + 1 + + 0 + + -34 + + + 2 + > (:include decl:) @@ -13164,11 +13343,11 @@ 0 - -64 + -31 2 - > namespace boost { (:include api pre_indent="4":) }@] + > #include <string> namespace boost { (:include api pre_indent="4":) }@] @@ -13186,7 +13365,7 @@ 0 - -15 + -71 2 @@ -13200,43 +13379,52 @@ -56 - - 1 - 2 - (:include api:) - - - - - 0 - - -57 - - 5 2 - `#include <(:link + `#include < 1 0 - -70 + -49 2 - :)> (:include + > (:include 1 0 - -70 + -49 2 synopsis:) + + + 0 + + -57 + + + + 3 + 2 + [@#include <(:link + 1 + + 0 + + -44 + + + 2 + :)> namespace boost { (:include api pre_indent="4":) }@] + + 0 @@ -13245,9 +13433,18 @@ - 1 + 3 2 - [@namespace boost { (:include decl pre_indent="4":) }@] + `#include <(:link + 1 + + 0 + + -66 + + + 2 + :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] @@ -13265,11 +13462,11 @@ 0 - -56 + -71 2 - :)> [@namespace boost { (:include decl:) }@] + :)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -13280,18 +13477,7 @@ - 3 - 2 - [@#include < - 1 - - 0 - - -40 - - - 2 - > #include <string> namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -13302,18 +13488,7 @@ - 3 - 2 - `#include <(:link - 1 - - 0 - - -23 - - - 2 - :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] + 0 @@ -13324,7 +13499,18 @@ - 0 + 3 + 2 + [@#include < + 1 + + 0 + + -31 + + + 2 + > namespace boost { (:include api pre_indent="4":) }@] @@ -13335,18 +13521,7 @@ - 3 - 2 - [@#include < - 1 - - 0 - - -40 - - - 2 - > #include <errno.h> namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -13359,7 +13534,7 @@ 1 2 - [@namespace boost { (:include api pre_indent="4":) }@] + [@#include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] @@ -13370,27 +13545,7 @@ - 5 - 2 - `#include < - 1 - - 0 - - -17 - - - 2 - > (:include - 1 - - 0 - - -17 - - - 2 - synopsis:) + 0 @@ -13401,27 +13556,18 @@ - 5 + 3 2 - `#include < + [@#include <string> namespace boost { (:include 1 0 - -60 + -42 2 - > (:include - 1 - - 0 - - -60 - - - 2 - synopsis:) + decl pre_indent="4":) (:include api pre_indent="4":) }@] @@ -13432,18 +13578,7 @@ - 3 - 2 - `#include <(:link - 1 - - 0 - - -71 - - - 2 - :)> [@namespace boost { (:include def pre_indent="4":) }@] + 0 @@ -13454,7 +13589,18 @@ - 0 + 3 + 2 + `#include < + 1 + + 0 + + -71 + + + 2 + > [@namespace boost { (:include decl pre_indent="4":) }@] @@ -13476,18 +13622,7 @@ - 3 - 2 - [@#include <(:link - 1 - - 0 - - -40 - - - 2 - :)> #include <string> namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -13505,7 +13640,7 @@ 0 - -64 + -44 2 @@ -13520,18 +13655,7 @@ - 3 - 2 - [@#include < - 1 - - 0 - - -40 - - - 2 - > #include <string> namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -13542,18 +13666,7 @@ - 3 - 2 - [@#include < - 1 - - 0 - - -71 - - - 2 - > #include <boost/tuple/tuple.hpp> namespace boost { (:include api pre_indent="4":) }@] + 0 @@ -13586,7 +13699,27 @@ - 0 + 5 + 2 + `#include < + 1 + + 0 + + -28 + + + 2 + > (:include + 1 + + 0 + + -28 + + + 2 + synopsis:) @@ -13597,7 +13730,49 @@ - 0 + 5 + 2 + `#include < + 1 + + 0 + + -54 + + + 2 + > (:include + 1 + + 0 + + -54 + + + 2 + synopsis:) + + + + + 0 + + -78 + + + + 3 + 2 + `#include <(:link + 1 + + 0 + + -66 + + + 2 + :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] @@ -13610,14 +13785,14 @@ - 84 + 85 reno_context_map - 73 + 74 -5 @@ -13837,11 +14012,65 @@ -77 + + -78 + - 73 + 74 + + + + + 0 + + + + + + 1 + + + + -33 + + + + + + + 0 + + + + + + 1 + + + + -17 + + + + + + + 0 + + + + + + 1 + + + + -41 + + @@ -13873,7 +14102,7 @@ - -28 + -40 @@ -13890,7 +14119,7 @@ - -69 + -18 @@ -13907,7 +14136,7 @@ - -5 + -67 @@ -13924,7 +14153,7 @@ - -54 + -39 @@ -13941,7 +14170,7 @@ - -25 + -14 @@ -13958,7 +14187,7 @@ - -47 + -22 @@ -13975,7 +14204,7 @@ - -10 + -6 @@ -13992,7 +14221,7 @@ - -48 + -74 @@ -14009,7 +14238,7 @@ - -19 + -63 @@ -14026,7 +14255,7 @@ - -13 + -61 @@ -14043,82 +14272,7 @@ - -76 - - - - - - - 0 - - - - - - 1 - - - - -38 - - - - - - - 0 - - - - - - 1 - - - - -42 - - - - - - - 0 - - - - - - 1 - - - - -75 - - - - - - - 1 - 95AD55ACCB1C17C1DBA4C309BDFCBD4B66E52CD9A2F54FDAD2D642A00342D001 - 3194412598 - 4599 - 323 - - - - - - 0 - ../../../../boost/exception/diagnostic_information.hpp - 0 - 0 - - - - -23 + -50 @@ -14142,7 +14296,7 @@ - -15 + -71 @@ -14166,7 +14320,7 @@ - -70 + -30 @@ -14194,175 +14348,7 @@ - -66 - - - - - - - 1 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - -64 - - - - - - - 2 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - 17E691632123EB67BA67D590B49EB8094F462F5A10A66A1C5438E1867EF1478E - 765399792 - 77 - 5887 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - -8 - - - - - - - 2 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - DF9EA87B0140AACF4422F1B76F6A6A409C15F32858BBBA85A35981A824C56BA9 - 1137981799 - 192 - 8964 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - -32 - - - - - - - 2 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - F3FB15CD82336271C6E875BC620385322777D16F0B7C233300783CE35710CCBF - 3292878997 - 282 - 7275 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - -11 - - - - - - - 2 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - 65D35B8A2063883A53E9D0DCC3FF8E5CA3573A58451A653CDE3003FFBEC576D3 - 1693870740 - 2195 - 3690 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - -20 - - - - - - - 3 - 371CB5A9AF48BE702BFD7FDF4EF18703E855F3A4C620AB21918B7064E1620B0C - 2238455337 - 9162 - 323 - 65D35B8A2063883A53E9D0DCC3FF8E5CA3573A58451A653CDE3003FFBEC576D3 - 1693870740 - 2195 - 3690 - DA154372D8C23BD9EDC30005CA7959CE686D198891097A837D006B5222F04DE9 - 2768248809 - 143 - 60 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - -44 + -77 @@ -14386,7 +14372,63 @@ - -14 + -49 + + + + + + + 2 + F7554EEA94C796DF4EC724B2F21CFE92B2A7BEF13097D61CE13CE50CE7192313 + 2034584854 + 4201 + 560 + 2973B09697BC6642C8CBECE8C3DD7C429FA1348B67AAAB47E01B9C1292EE3BB2 + 2629550564 + 3677 + 26 + + + + + + 0 + ../../../../boost/exception/diagnostic_information.hpp + 0 + 0 + + + + -58 + + + + + + + 2 + F7554EEA94C796DF4EC724B2F21CFE92B2A7BEF13097D61CE13CE50CE7192313 + 2034584854 + 4201 + 560 + 5738DF31DB52E5E8784199058479E798957794147A099D834110FF821C605EE3 + 1133216499 + 490 + 3705 + + + + + + 0 + ../../../../boost/exception/diagnostic_information.hpp + 0 + 0 + + + + -78 @@ -14414,7 +14456,7 @@ - -35 + -59 @@ -14442,7 +14484,7 @@ - -21 + -36 @@ -14498,7 +14540,7 @@ - -7 + -68 @@ -14526,7 +14568,7 @@ - -37 + -51 @@ -14554,7 +14596,7 @@ - -18 + -26 @@ -14578,7 +14620,7 @@ - -41 + -72 @@ -14606,7 +14648,7 @@ - -50 + -32 @@ -14630,7 +14672,7 @@ - -31 + -64 @@ -14654,7 +14696,7 @@ - -63 + -23 @@ -14678,7 +14720,7 @@ - -29 + -24 @@ -14706,7 +14748,7 @@ - -24 + -37 @@ -14730,7 +14772,31 @@ - -12 + -65 + + + + + + + 1 + A2BF537B251039FA1AF972D55F975E8FDDD14F2731A47FBDEBF3E001F7CF5245 + 2585086703 + 4165 + 323 + + + + + + 0 + ../../../../boost/exception/info.hpp + 0 + 0 + + + + -57 @@ -14758,7 +14824,7 @@ - -26 + -76 @@ -14782,7 +14848,7 @@ - -33 + -21 @@ -14810,7 +14876,7 @@ - -67 + -48 @@ -14842,7 +14908,7 @@ - -34 + -13 @@ -14874,7 +14940,7 @@ - -30 + -35 @@ -14898,35 +14964,7 @@ - -74 - - - - - - - 2 - 02F77B8305279514F37A75FA6454AE750E04E7AA7934D395EFB52BCC7642965E - 430535365 - 3379 - 560 - D08B74734CDA5115D9E47783E2994C2836BE241FB25E589BB4C67F2596727C03 - 24341149 - 3347 - 26 - - - - - - 0 - ../../../../boost/exception/diagnostic_information.hpp - 0 - 0 - - - - -61 + -25 @@ -14950,7 +14988,7 @@ - -72 + -38 @@ -14978,7 +15016,7 @@ - -36 + -20 @@ -15002,7 +15040,7 @@ - -53 + -9 @@ -15030,7 +15068,7 @@ - -16 + -56 @@ -15054,7 +15092,175 @@ - -6 + -73 + + + + + + + 1 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + -44 + + + + + + + 2 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + 17E691632123EB67BA67D590B49EB8094F462F5A10A66A1C5438E1867EF1478E + 765399792 + 77 + 5929 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + -69 + + + + + + + 2 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + DF9EA87B0140AACF4422F1B76F6A6A409C15F32858BBBA85A35981A824C56BA9 + 1137981799 + 192 + 9006 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + -5 + + + + + + + 2 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + F3FB15CD82336271C6E875BC620385322777D16F0B7C233300783CE35710CCBF + 3292878997 + 282 + 7317 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + -29 + + + + + + + 2 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + E8F75513DDED11FD99209774D96C52882C530DC63A1B0527156DF56901DAF5C7 + 1386049295 + 2209 + 3718 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + -42 + + + + + + + 3 + D6841F0363736F4F8554C35ADD6A9D160C4C49AF6F64FD9E259BC154F779866F + 1169632142 + 9204 + 323 + E8F75513DDED11FD99209774D96C52882C530DC63A1B0527156DF56901DAF5C7 + 1386049295 + 2209 + 3718 + DA154372D8C23BD9EDC30005CA7959CE686D198891097A837D006B5222F04DE9 + 2768248809 + 143 + 60 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + -15 @@ -15078,7 +15284,7 @@ - -17 + -62 @@ -15106,35 +15312,7 @@ - -65 - - - - - - - 2 - D57BF77EE44CD2755E24A56DDC3E159716D04A7ABE009AE977D4926EFEC00F73 - 2498368808 - 973 - 3941 - 9432C669E21C649A86AC6DC5A34275B483A7D2D38118A462DF1C1CD7BBE5ED51 - 2535426829 - 441 - 110 - - - - - - 0 - ../../../../boost/exception/diagnostic_information.hpp - 0 - 0 - - - - -52 + -27 @@ -15158,63 +15336,7 @@ - -27 - - - - - - - 2 - 729C4823568528056026F84642250C2A19F5EC21C6BCA14B482D2C3370F06990 - 2578904403 - 3888 - 518 - 6E325144EF4F41FA3A225EB30729101382C4E99B3D6160E307311E4B4E641010 - 1097215175 - 161 - 240 - - - - - - 0 - ../../../../boost/exception/info.hpp - 0 - 0 - - - - -22 - - - - - - - 2 - 729C4823568528056026F84642250C2A19F5EC21C6BCA14B482D2C3370F06990 - 2578904403 - 3888 - 518 - D31BCE814DF5B8B718E7EB67A194AD08EF716A26D422E436596ABA1F145007D8 - 4055211476 - 525 - 3357 - - - - - - 0 - ../../../../boost/exception/info.hpp - 0 - 0 - - - - -45 + -28 @@ -15238,7 +15360,7 @@ - -39 + -11 @@ -15266,7 +15388,7 @@ - -58 + -19 @@ -15290,7 +15412,7 @@ - -60 + -54 @@ -15314,7 +15436,31 @@ - -62 + -60 + + + + + + + 1 + 5AD376A17B373BF62FE491E6E7883756836612C74138FFFA15FFF54E7CDBADAA + 20822643 + 5426 + 323 + + + + + + 0 + ../../../../boost/exception/diagnostic_information.hpp + 0 + 0 + + + + -66 @@ -15342,7 +15488,7 @@ - -59 + -45 @@ -15374,7 +15520,7 @@ - -68 + -12 @@ -15398,7 +15544,7 @@ - -77 + -75 @@ -15422,7 +15568,7 @@ - -56 + -34 @@ -15446,7 +15592,7 @@ - -51 + -53 @@ -15470,31 +15616,7 @@ - -73 - - - - - - - 1 - 0A3DA9A448D03ACAC4C613BEB8B1F68E822C970ABF81D7EEE0CF3152623232E0 - 1462319939 - 4083 - 323 - - - - - - 0 - ../../../../boost/exception/info.hpp - 0 - 0 - - - - -71 + -52 @@ -15522,7 +15644,91 @@ - -57 + -43 + + + + + + + 2 + 46AE88799BE7F14F1E2B48F0077193517F25AFFD4AE13C30489247555042EEE3 + 1975649535 + 3970 + 518 + 6E325144EF4F41FA3A225EB30729101382C4E99B3D6160E307311E4B4E641010 + 1097215175 + 161 + 240 + + + + + + 0 + ../../../../boost/exception/info.hpp + 0 + 0 + + + + -10 + + + + + + + 2 + 46AE88799BE7F14F1E2B48F0077193517F25AFFD4AE13C30489247555042EEE3 + 1975649535 + 3970 + 518 + D31BCE814DF5B8B718E7EB67A194AD08EF716A26D422E436596ABA1F145007D8 + 4055211476 + 525 + 3439 + + + + + + 0 + ../../../../boost/exception/info.hpp + 0 + 0 + + + + -7 + + + + + + + 2 + E08150343DD1B942E2AC7DDB8EE52852BF2E03476430238FCFF49CD2C09E55E6 + 1796675348 + 978 + 4763 + 36688510914673386A7870D1D4970B7D74CF9A4B7226F9E225A5607DCBFB12C4 + 2314308857 + 446 + 110 + + + + + + 0 + ../../../../boost/exception/diagnostic_information.hpp + 0 + 0 + + + + -47 @@ -15546,7 +15752,7 @@ - -49 + -16 @@ -15574,7 +15780,7 @@ - -40 + -31 @@ -15602,7 +15808,7 @@ - -43 + -8 @@ -15626,7 +15832,7 @@ - -9 + -70 @@ -15636,14 +15842,14 @@ - 85 + 86 tag_index - 55 + 56 1 @@ -15657,16 +15863,7 @@ -5 - - - - - 0 - - -6 - - - noalso noindex tutorial + exception_ptr free function @@ -15675,7 +15872,7 @@ -7 - type + error_info free function @@ -15684,16 +15881,7 @@ -8 - function - - - - 0 - - -9 - - - noindex + error_info free function @@ -15702,7 +15890,7 @@ -10 - tutorial + function member @@ -15711,7 +15899,16 @@ -11 - error_info free function + + + + + 0 + + -13 + + + type @@ -15720,7 +15917,7 @@ -15 - + function @@ -15729,7 +15926,16 @@ -16 - error_info_instance noalso type + tutorial + + + + 0 + + -17 + + + tutorial @@ -15738,7 +15944,16 @@ -18 - exception_ptr free function + exception_ptr + + + + 0 + + -19 + + + error_info free function @@ -15747,7 +15962,7 @@ -20 - type + error_info_instance noalso type @@ -15756,25 +15971,7 @@ -21 - exception_ptr free function - - - - 0 - - -22 - - - function member - - - - 0 - - -23 - - - + noalso noindex tutorial @@ -15783,7 +15980,7 @@ -24 - function + noindex tutorial @@ -15792,7 +15989,7 @@ -25 - exception_ptr + diagnostic_information tutorial @@ -15801,16 +15998,16 @@ -26 - error_info_instance noalso type + exception_ptr free function 0 - -28 + -27 - tutorial + error_info_instance noalso type @@ -15819,16 +16016,7 @@ -29 - noindex tutorial - - - - 0 - - -30 - - - function member + error_info free function @@ -15837,7 +16025,7 @@ -31 - error_info + @@ -15846,7 +16034,7 @@ -32 - exception_ptr free function + error_info_instance noalso type @@ -15855,7 +16043,7 @@ -33 - noalso noindex tutorial + noindex @@ -15864,7 +16052,7 @@ -34 - type + @@ -15873,7 +16061,7 @@ -35 - exception_ptr type + function member @@ -15882,7 +16070,7 @@ -36 - error_info_instance noalso type + exception_ptr free function @@ -15891,7 +16079,7 @@ -37 - exception_ptr free function + function @@ -15900,7 +16088,7 @@ -39 - + tutorial @@ -15909,7 +16097,7 @@ -40 - + error_info @@ -15918,7 +16106,16 @@ -41 - noindex tutorial + tutorial + + + + 0 + + -42 + + + type @@ -15927,7 +16124,7 @@ -43 - error_info free function + error_info_instance noalso type @@ -15936,7 +16133,7 @@ -44 - function + @@ -15945,7 +16142,7 @@ -45 - error_info free function + free function @@ -15954,40 +16151,13 @@ -46 - noindex + 0 - -49 - - - tutorial - - - - 0 - - -50 - - - error_info_instance noalso type - - - - 0 - - -51 - - - macro - - - - 0 - - -52 + -47 function @@ -15996,10 +16166,37 @@ 0 - -54 + -48 - error_info + type + + + + 0 + + -51 + + + exception_ptr free function + + + + 0 + + -52 + + + + + + + 0 + + -53 + + + macro @@ -16017,7 +16214,7 @@ -56 - + error_info_instance noalso type @@ -16026,7 +16223,7 @@ -57 - error_info_instance noalso type + @@ -16035,7 +16232,7 @@ -58 - error_info free function + diagnostic_information free function @@ -16044,22 +16241,13 @@ -59 - free function + exception_ptr type 0 - -61 - - - diagnostic_information free function - - - - 0 - - -62 + -60 noalso noindex tutorial @@ -16071,16 +16259,7 @@ -64 - - - - - 0 - - -65 - - - error_info_instance noalso type + error_info @@ -16089,13 +16268,13 @@ -66 - error_info_instance noalso type + 0 - -67 + -68 type @@ -16107,7 +16286,16 @@ -69 - tutorial + function + + + + 0 + + -70 + + + noindex @@ -16122,19 +16310,46 @@ 0 - -73 + -72 - + noindex tutorial 0 - -74 + -73 - diagnostic_information tutorial + noalso noindex tutorial + + + + 0 + + -76 + + + error_info_instance noalso type + + + + 0 + + -77 + + + error_info_instance noalso type + + + + 0 + + -78 + + + free function diff --git a/include/boost/exception/diagnostic_information.hpp b/include/boost/exception/diagnostic_information.hpp index 01f7b35..1ea9dc1 100644 --- a/include/boost/exception/diagnostic_information.hpp +++ b/include/boost/exception/diagnostic_information.hpp @@ -44,14 +44,14 @@ boost inline char const * - get_diagnostic_information( exception const & x ) + get_diagnostic_information( exception const & x, char const * header ) { if( error_info_container * c=x.data_.get() ) #ifndef BOOST_NO_EXCEPTIONS try { #endif - return c->diagnostic_information(); + return c->diagnostic_information(header); #ifndef BOOST_NO_EXCEPTIONS } catch(...) @@ -63,7 +63,7 @@ boost inline std::string - diagnostic_information_impl( boost::exception const * be, std::exception const * se ) + diagnostic_information_impl( boost::exception const * be, std::exception const * se, bool with_what ) { BOOST_ASSERT(be||se); #ifndef BOOST_NO_RTTI @@ -72,6 +72,13 @@ boost if( !be ) be = dynamic_cast(se); #endif + char const * wh=0; + if( with_what && se ) + { + wh=se->what(); + if( be && exception_detail::get_diagnostic_information(*be,0)==wh ) + return wh; + } std::ostringstream tmp; if( be ) { @@ -92,12 +99,12 @@ boost tmp << std::string("Dynamic exception type: ") << (be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).name() << '\n'; #endif - if( se ) - tmp << "std::exception::what: " << se->what() << '\n'; + if( with_what && se ) + tmp << "std::exception::what: " << wh << '\n'; if( be ) - if( char const * s=exception_detail::get_diagnostic_information(*be) ) + if( char const * s=exception_detail::get_diagnostic_information(*be,tmp.str().c_str()) ) if( *s ) - tmp << s; + return s; return tmp.str(); } } @@ -107,7 +114,7 @@ boost typename enable_if,std::string>::type diagnostic_information( T const & e ) { - return exception_detail::diagnostic_information_impl(&e,0); + return exception_detail::diagnostic_information_impl(&e,0,true); } template @@ -115,7 +122,28 @@ boost typename enable_if,std::string>::type diagnostic_information( T const & e ) { - return exception_detail::diagnostic_information_impl(0,&e); + return exception_detail::diagnostic_information_impl(0,&e,true); + } + + inline + char const * + diagnostic_information_what( exception const & e ) throw() + { + char const * w=0; +#ifndef BOOST_NO_EXCEPTIONS + try + { +#endif + (void) exception_detail::diagnostic_information_impl(&e,0,false); + return exception_detail::get_diagnostic_information(e,0); +#ifndef BOOST_NO_EXCEPTIONS + } + catch( + ... ) + { + } +#endif + return w; } } @@ -131,7 +159,7 @@ boost boost::exception const * be=current_exception_cast(); std::exception const * se=current_exception_cast(); if( be || se ) - return exception_detail::diagnostic_information_impl(be,se); + return exception_detail::diagnostic_information_impl(be,se,true); else return "No diagnostic information available."; } diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index f71f9f5..e7faf59 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -143,7 +143,7 @@ boost struct error_info_container { - virtual char const * diagnostic_information() const = 0; + virtual char const * diagnostic_information( char const * ) const = 0; virtual shared_ptr get( type_info_ const & ) const = 0; virtual void set( shared_ptr const &, type_info_ const & ) = 0; virtual void add_ref() const = 0; @@ -169,7 +169,7 @@ boost template <> struct get_info; - char const * get_diagnostic_information( exception const & ); + char const * get_diagnostic_information( exception const &, char const * ); } class @@ -231,7 +231,7 @@ boost return x; } - friend char const * exception_detail::get_diagnostic_information( exception const & ); + friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); template friend E const & operator<<( E const &, error_info const & ); diff --git a/include/boost/exception/info.hpp b/include/boost/exception/info.hpp index 67dbe6a..c1b76c0 100644 --- a/include/boost/exception/info.hpp +++ b/include/boost/exception/info.hpp @@ -98,11 +98,13 @@ boost } char const * - diagnostic_information() const + diagnostic_information( char const * header ) const { - if( diagnostic_info_str_.empty() ) + if( header ) { + BOOST_ASSERT(*header!=0); std::ostringstream tmp; + tmp << header; for( error_info_map::const_iterator i=info_.begin(),end=info_.end(); i!=end; ++i ) { shared_ptr const & x = i->second; diff --git a/test/diagnostic_information_test.cpp b/test/diagnostic_information_test.cpp index ff3607d..8ced6e3 100644 --- a/test/diagnostic_information_test.cpp +++ b/test/diagnostic_information_test.cpp @@ -43,6 +43,29 @@ error2: { }; +struct +error3: + std::exception + { + char const * + what() const throw() + { + return "error3"; + } + }; + +struct +error4: + std::exception, + boost::exception + { + char const * + what() const throw() + { + return diagnostic_information_what(*this); + } + }; + void test1( std::string const & di1, std::string const & di2 ) { @@ -75,6 +98,33 @@ test2( std::string const & di1, std::string const & di2 ) BOOST_TEST(di2.find("bad value")!=std::string::npos); } +void +test3( std::string const & di ) + { +#ifndef BOOST_NO_RTTI + BOOST_TEST(di.find("type:")!=std::string::npos); +#endif + BOOST_TEST(di.find("error3")!=std::string::npos); + } + +void +test4( std::string const & di1, std::string const & di2 ) + { + BOOST_TEST( di1!=di2 ); +#ifndef BOOST_NO_RTTI + BOOST_TEST(di1.find("type:")!=std::string::npos); +#endif + BOOST_TEST(di1.find("test_tag1")!=std::string::npos); + BOOST_TEST(di1.find("test_tag2")!=std::string::npos); + BOOST_TEST(di1.find("fourty-two")!=std::string::npos); +#ifndef BOOST_NO_RTTI + BOOST_TEST(di2.find("type:")!=std::string::npos); +#endif + BOOST_TEST(di2.find("test_tag1")!=std::string::npos); + BOOST_TEST(di2.find("test_tag2")!=std::string::npos); + BOOST_TEST(di2.find("bad value")!=std::string::npos); + } + int main() { @@ -131,9 +181,58 @@ main() error2 & x ) { std::string di1 = current_exception_diagnostic_information(); + BOOST_TEST(di1==boost::diagnostic_information_what(x)); x << tagged_int1(2) << tagged_int2(2); std::string di2 = current_exception_diagnostic_information(); + BOOST_TEST(di2==boost::diagnostic_information_what(x)); test2(di1,di2); } + try + { + error3 x; + std::string di=diagnostic_information(x); + test3(di); + throw x; + } + catch( + ... ) + { + std::string di=current_exception_diagnostic_information(); + test3(di); + } + try + { + error4 x; x << tagged_int1(42) << tagged_int2(42); + throw x; + } + catch( + error4 & x ) + { + std::string di1=boost::diagnostic_information(x); + std::string wh1=x.what(); + BOOST_TEST(wh1==di1); + x << tagged_int1(2) << tagged_int2(2); + std::string di2 = diagnostic_information(x); + std::string wh2=x.what(); + BOOST_TEST(wh2==di2); + test4(di1,di2); + } + try + { + error4 x; x << tagged_int1(42) << tagged_int2(42); + throw x; + } + catch( + error4 & x ) + { + std::string di1=boost::current_exception_diagnostic_information(); + std::string wh1=x.what(); + BOOST_TEST(wh1==di1); + x << tagged_int1(2) << tagged_int2(2); + std::string di2 = current_exception_diagnostic_information(); + std::string wh2=x.what(); + BOOST_TEST(wh2==di2); + test4(di1,di2); + } return boost::report_errors(); }