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 boost/throw_exception.hpp.
+
BOOST_NO_EXCEPTIONS
+
This macro disables exception handling in Boost, forwarding all exceptions to a user-defined non-template version of boost::throw_exception. 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::diagnostic_information (of course under BOOST_NO_EXCEPTIONS, the user-defined boost::throw_exception is not allowed to return to the caller.)
diff --git a/doc/source/boost-exception.reno b/doc/source/boost-exception.reno
index 2e58002..c85fe07 100644
--- a/doc/source/boost-exception.reno
+++ b/doc/source/boost-exception.reno
@@ -48,6 +48,55 @@
reno_context
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 6
+
+ reno_context
+
+
+
+ 0
+
+ 9reno_context
@@ -176,104 +263,6 @@
(:include include:)
(:auto also:)
-
-
- 0
-
- 8
-
- reno_context
-
-
-
-
-
-
- 2
- 55F1164770FD778354E151EF65A3E830DA20F325F7ED20A95130A4B83FC801BF
- 1282550303
- 9192
- 323
- F3FB15CD82336271C6E875BC620385322777D16F0B7C233300783CE35710CCBF
- 3292878997
- 282
- 7305
-
-
-
-
-
- 0
- ../../../../boost/exception/exception.hpp
- 0
- 0
-
-
-
-
- enable_error_info
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 9
-
- reno_context
-
-
-
-
-
-
- 2
- 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44
- 2533933282
- 8724
- 615
- F86EB07D04CD0D0645080D1121DA899746D0C45137E17E1D9BE605E75396F047
- 1983537541
- 1346
- 148
-
-
-
-
-
- 0
- ../../../../boost/exception_ptr.hpp
- 0
- 0
-
-
-
-
- exception_ptr
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
- 0
@@ -282,219 +271,6 @@
reno_context
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
-
- frequently asked questions
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 11
-
- reno_context
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
-
- exception types as simple semantic tags
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 12
-
- reno_context
-
-
-
-
-
-
- 1
- D9B8E6AA12A4F33953B1A961FA590C5A3840234B6531CA8C04AC985AD5800835
- 2432554768
- 702
- 408
-
-
-
-
-
- 0
- ../../example/enable_error_info.cpp
- 0
- 0
-
-
-
-
- integrating boost exception in existing exception class hierarchies
-
-
- tutorial_enable_error_info
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 13
-
- reno_context
-
-
-
-
-
-
- 1
- FC684D0DD5A9732B4130F2AB3DB6E0491D0F523E14B7FB738B2019EA2C7F8717
- 2229778754
- 631
- 319
-
-
-
-
-
- 0
- ../../example/cloning_2.cpp
- 0
- 0
-
-
-
-
- cloning and re-throwing an exception
-
-
- cloning_and_rethrowing
-
-
-
-
-
- 0
-
-
-
-
- 0
-
- 14
-
- reno_context
-
-
-
-
-
-
- 2
- 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44
- 2533933282
- 8724
- 615
- 0066D4E6E6B189906E6DE04F08509F3737511701A1B1355B37511EC18E8371F4
- 2078296250
- 305
- 8156
-
-
-
-
-
- 0
- ../../../../boost/exception_ptr.hpp
- 0
- 0
-
-
-
-
- copy_exception
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 15
-
- reno_context
-
@@ -536,6 +312,230 @@
(:include include:)
(:auto also:)
+
+
+ 0
+
+ 11
+
+ reno_context
+
+
+
+
+
+
+ 2
+ 55F1164770FD778354E151EF65A3E830DA20F325F7ED20A95130A4B83FC801BF
+ 1282550303
+ 9192
+ 323
+ F3FB15CD82336271C6E875BC620385322777D16F0B7C233300783CE35710CCBF
+ 3292878997
+ 282
+ 7305
+
+
+
+
+
+ 0
+ ../../../../boost/exception/exception.hpp
+ 0
+ 0
+
+
+
+
+ enable_error_info
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 12
+
+ reno_context
+
+
+
+
+
+
+ 2
+ 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44
+ 2533933282
+ 8724
+ 615
+ F86EB07D04CD0D0645080D1121DA899746D0C45137E17E1D9BE605E75396F047
+ 1983537541
+ 1346
+ 148
+
+
+
+
+
+ 0
+ ../../../../boost/exception_ptr.hpp
+ 0
+ 0
+
+
+
+
+ exception_ptr
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 13
+
+ reno_context
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+
+ exception types as simple semantic tags
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 14
+
+ reno_context
+
+
+
+
+
+
+ 1
+ D9B8E6AA12A4F33953B1A961FA590C5A3840234B6531CA8C04AC985AD5800835
+ 2432554768
+ 702
+ 408
+
+
+
+
+
+ 0
+ ../../example/enable_error_info.cpp
+ 0
+ 0
+
+
+
+
+ integrating boost exception in existing exception class hierarchies
+
+
+ tutorial_enable_error_info
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 15
+
+ reno_context
+
+
+
+
+
+
+ 1
+ FC684D0DD5A9732B4130F2AB3DB6E0491D0F523E14B7FB738B2019EA2C7F8717
+ 2229778754
+ 631
+ 319
+
+
+
+
+
+ 0
+ ../../example/cloning_2.cpp
+ 0
+ 0
+
+
+
+
+ cloning and re-throwing an exception
+
+
+ cloning_and_rethrowing
+
+
+
+
+
+ 0
+
+ 0
@@ -544,6 +544,71 @@
reno_context
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+
+ Motivation
+
+
+ motivation
+
+
+
+
+
+ 7
+ 2
+ (:include include:)
(:auto also explicit="
+ 1
+
+ 0
+
+ -13
+
+
+ 2
+
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ ":)
+
+
+
+
+ 0
+
+ 17
+
+ reno_context
+
@@ -593,7 +658,7 @@
0
- 17
+ 18reno_context
@@ -642,7 +707,7 @@
0
- 18
+ 19reno_context
@@ -683,71 +748,6 @@
(:include include:)
(:auto also:)
-
-
- 0
-
- 19
-
- reno_context
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
-
- Motivation
-
-
- motivation
-
-
-
-
-
- 7
- 2
- (:include include:)
(:auto also explicit="
- 1
-
- 0
-
- -11
-
-
- 2
-
- 1
-
- 0
-
- -12
-
-
- 2
-
- 1
-
- 0
-
- -10
-
-
- 2
- ":)
-
- 0
@@ -850,6 +850,49 @@
reno_context
+
+
+
+
+
+ 1
+ E444EE9697EEADFDE0767E1D0242FC0E70D98E61FB1F0FFA099648DE509B82F3
+ 94503238
+ 773
+ 374
+
+
+
+
+
+ 0
+ ../../example/info_tuple.cpp
+ 0
+ 0
+
+
+
+
+ adding grouped data to exceptions
+
+
+ grouping_data
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+ 23
+
+ reno_context
+
@@ -895,7 +938,7 @@
0
- 23
+ 24reno_context
@@ -940,7 +983,7 @@
0
- 24
+ 25reno_context
@@ -985,7 +1028,7 @@
0
- 25
+ 26reno_context
@@ -1034,7 +1077,7 @@
0
- 26
+ 27reno_context
@@ -1072,7 +1115,7 @@
0
- 27
+ 28reno_context
@@ -1117,55 +1160,6 @@
(:include include:)
(:auto also:)
-
-
- 0
-
- 28
-
- reno_context
-
-
-
-
-
-
- 2
- 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44
- 2533933282
- 8724
- 615
- 9F3671DA5E8AB414F1FBA3B160D49134EAEE8DFF33E95376EDB41534E916FF38
- 2436936467
- 718
- 1496
-
-
-
-
-
- 0
- ../../../../boost/exception_ptr.hpp
- 0
- 0
-
-
-
-
- unknown_exception
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
- 0
@@ -1174,408 +1168,6 @@
reno_context
-
-
-
-
-
- 2
- FEABD2D011FBCE667D26BAD68A1C65D81E98DD40081CC70F2738AC3151A8FC4A
- 4260129224
- 2393
- 504
- C708EDCAC3964E2F3C3A081700112C5F15C7BF7A61FDF2EF39D112FC9B987CE3
- 1739153824
- 2361
- 26
-
-
-
-
-
- 0
- ../../../../boost/exception/get_error_info.hpp
- 0
- 0
-
-
-
-
- get_error_info
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 30
-
- reno_context
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
-
- boost exception
-
-
- boost-exception
-
-
-
-
-
- 1
- 2
- (:include include:)
-
-
-
-
- 0
-
- 31
-
- reno_context
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
-
- transporting of exceptions between threads
-
-
- tutorial_exception_ptr
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 32
-
- reno_context
-
-
-
-
-
-
- 2
- 612485E090D76B2CC43C1A296F813075BA165C2496082E78E939F10B3DA8E09A
- 1770110914
- 587
- 1462
- 60F3F48B87487FA6E0D2CCC0750AF435CC92CEC80BBBF609AC71295031AADD0D
- 3929437933
- 361
- 213
-
-
-
-
-
- 0
- ../../../../boost/throw_exception.hpp
- 0
- 0
-
-
-
-
- throw_exception
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 33
-
- reno_context
-
-
-
-
-
-
- 2
- 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44
- 2533933282
- 8724
- 615
- 0E9DF8366080712A816BE91ABCEF1E2044145B63D75B0B995B537900F378189E
- 1069696031
- 255
- 8463
-
-
-
-
-
- 0
- ../../../../boost/exception_ptr.hpp
- 0
- 0
-
-
-
-
- rethrow_exception
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 34
-
- reno_context
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
-
- using virtual inheritance in exception types
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 35
-
- reno_context
-
-
-
-
-
-
- 2
- 55F1164770FD778354E151EF65A3E830DA20F325F7ED20A95130A4B83FC801BF
- 1282550303
- 9192
- 323
- 65D35B8A2063883A53E9D0DCC3FF8E5CA3573A58451A653CDE3003FFBEC576D3
- 1693870740
- 2195
- 3720
-
-
-
-
-
- 0
- ../../../../boost/exception/exception.hpp
- 0
- 0
-
-
-
-
- exception
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
----
!!!See Also:
(:pagelist link="backlink" except_tags="exception,member" mod="w":)
-
-
-
-
- 0
-
- 36
-
- reno_context
-
-
-
-
-
-
- 2
- 126BB1D8971585CBE7D78EF3C12259D72FD5E973A84626AA9FC3234220A11CAB
- 3471702891
- 969
- 344
- A7FD310E1340E103081DA2A7899DA0E213C696C84D52C17ADA09F6942EE97D47
- 2978648279
- 530
- 433
-
-
-
-
-
- 0
- ../../../../boost/exception/detail/error_info_impl.hpp
- 0
- 0
-
-
-
-
- error_info
-
-
-
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 37
-
- reno_context
-
-
-
-
-
-
- 1
- 4ED9709788BBAB4DE7CF336561606B8C0B41F70877A3395F4EE026F4AEB66CC6
- 743998427
- 409
- 307
-
-
-
-
-
- 0
- ../../example/cloning_1.cpp
- 0
- 0
-
-
-
-
- using enable_current_exception at the time of the throw
-
-
- using_enable_cloning
-
-
-
-
-
- 0
-
-
-
-
- 0
-
- 38
-
- reno_context
-
@@ -1621,7 +1213,7 @@
0
- 39
+ 30reno_context
@@ -1630,41 +1222,406 @@
- 1
- E444EE9697EEADFDE0767E1D0242FC0E70D98E61FB1F0FFA099648DE509B82F3
- 94503238
- 773
- 374
+ 2
+ 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44
+ 2533933282
+ 8724
+ 615
+ 9F3671DA5E8AB414F1FBA3B160D49134EAEE8DFF33E95376EDB41534E916FF38
+ 2436936467
+ 718
+ 14960
- ../../example/info_tuple.cpp
+ ../../../../boost/exception_ptr.hpp00
- adding grouped data to exceptions
+ unknown_exception
- grouping_data
+
- 0
+ 1
+ 2
+ (:include include:)
(:auto also:)
0
- 40
+ 31
+
+ reno_context
+
+
+
+
+
+
+ 2
+ FEABD2D011FBCE667D26BAD68A1C65D81E98DD40081CC70F2738AC3151A8FC4A
+ 4260129224
+ 2393
+ 504
+ C708EDCAC3964E2F3C3A081700112C5F15C7BF7A61FDF2EF39D112FC9B987CE3
+ 1739153824
+ 2361
+ 26
+
+
+
+
+
+ 0
+ ../../../../boost/exception/get_error_info.hpp
+ 0
+ 0
+
+
+
+
+ get_error_info
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 32
+
+ reno_context
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+
+ boost exception
+
+
+ boost-exception
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
+
+
+
+
+ 0
+
+ 33
+
+ reno_context
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+
+ transporting of exceptions between threads
+
+
+ tutorial_exception_ptr
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 34
+
+ reno_context
+
+
+
+
+
+
+ 2
+ 612485E090D76B2CC43C1A296F813075BA165C2496082E78E939F10B3DA8E09A
+ 1770110914
+ 587
+ 1462
+ 60F3F48B87487FA6E0D2CCC0750AF435CC92CEC80BBBF609AC71295031AADD0D
+ 3929437933
+ 361
+ 213
+
+
+
+
+
+ 0
+ ../../../../boost/throw_exception.hpp
+ 0
+ 0
+
+
+
+
+ throw_exception
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 35
+
+ reno_context
+
+
+
+
+
+
+ 2
+ 9748FFBBC9F02FEB97E0BA1E6280C51FFF5D7F217F0F12EE8ED29F6BE5CCCE44
+ 2533933282
+ 8724
+ 615
+ 0E9DF8366080712A816BE91ABCEF1E2044145B63D75B0B995B537900F378189E
+ 1069696031
+ 255
+ 8463
+
+
+
+
+
+ 0
+ ../../../../boost/exception_ptr.hpp
+ 0
+ 0
+
+
+
+
+ rethrow_exception
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 36
+
+ reno_context
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+
+ using virtual inheritance in exception types
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 37
+
+ reno_context
+
+
+
+
+
+
+ 2
+ 55F1164770FD778354E151EF65A3E830DA20F325F7ED20A95130A4B83FC801BF
+ 1282550303
+ 9192
+ 323
+ 65D35B8A2063883A53E9D0DCC3FF8E5CA3573A58451A653CDE3003FFBEC576D3
+ 1693870740
+ 2195
+ 3720
+
+
+
+
+
+ 0
+ ../../../../boost/exception/exception.hpp
+ 0
+ 0
+
+
+
+
+ exception
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
----
!!!See Also:
(:pagelist link="backlink" except_tags="exception,member" mod="w":)
+
+
+
+
+ 0
+
+ 38
+
+ reno_context
+
+
+
+
+
+
+ 2
+ 126BB1D8971585CBE7D78EF3C12259D72FD5E973A84626AA9FC3234220A11CAB
+ 3471702891
+ 969
+ 344
+ A7FD310E1340E103081DA2A7899DA0E213C696C84D52C17ADA09F6942EE97D47
+ 2978648279
+ 530
+ 433
+
+
+
+
+
+ 0
+ ../../../../boost/exception/detail/error_info_impl.hpp
+ 0
+ 0
+
+
+
+
+ error_info
+
+
+
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 39reno_context
@@ -1698,6 +1655,49 @@
(:include include:)
(:auto also:)
+
+
+ 0
+
+ 40
+
+ reno_context
+
+
+
+
+
+
+ 1
+ 4ED9709788BBAB4DE7CF336561606B8C0B41F70877A3395F4EE026F4AEB66CC6
+ 743998427
+ 409
+ 307
+
+
+
+
+
+ 0
+ ../../example/cloning_1.cpp
+ 0
+ 0
+
+
+
+
+ using enable_current_exception at the time of the throw
+
+
+ using_enable_cloning
+
+
+
+
+
+ 0
+
+ 0
@@ -1794,6 +1794,49 @@
reno_context
+
+
+
+
+
+ 1
+ 9E8DCE3BCF462A3A332DA70F61E46FA5C2AB791B95E33D3F2AF1307F53C84B1C
+ 1960675522
+ 6483
+ 591
+
+
+
+
+
+ 0
+ ../../example/example_io.cpp
+ 0
+ 0
+
+
+
+
+ diagnostic_information example
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+ 44
+
+ reno_context
+
@@ -1833,7 +1876,7 @@
0
- 44
+ 45reno_context
@@ -1886,7 +1929,7 @@
0
- 45
+ 46reno_context
@@ -1939,7 +1982,7 @@
0
- 46
+ 47reno_context
@@ -1977,7 +2020,7 @@
0
- 47
+ 48reno_context
@@ -2015,7 +2058,7 @@
0
- 48
+ 49reno_context
@@ -2060,7 +2103,7 @@
0
- 49
+ 50reno_context
@@ -2105,7 +2148,7 @@
0
- 50
+ 51reno_context
@@ -2158,7 +2201,7 @@
0
- 51
+ 52reno_context
@@ -2196,7 +2239,7 @@
0
- 52
+ 53reno_context
@@ -2234,7 +2277,7 @@
0
- 53
+ 54reno_context
@@ -2283,7 +2326,7 @@
0
- 54
+ 55reno_context
@@ -2321,7 +2364,7 @@
0
- 55
+ 56reno_context
@@ -2366,7 +2409,7 @@
0
- 56
+ 57reno_context
@@ -2411,7 +2454,7 @@
0
- 57
+ 58reno_context
@@ -2456,7 +2499,7 @@
0
- 58
+ 59reno_context
@@ -2494,7 +2537,7 @@
0
- 59
+ 60reno_context
@@ -2535,49 +2578,6 @@
(:include include:)
(:auto also:)
-
-
- 0
-
- 60
-
- reno_context
-
-
-
-
-
-
- 1
- 9E8DCE3BCF462A3A332DA70F61E46FA5C2AB791B95E33D3F2AF1307F53C84B1C
- 1960675522
- 6483
- 591
-
-
-
-
-
- 0
- ../../example/example_io.cpp
- 0
- 0
-
-
-
-
- diagnostic_information example
-
-
-
-
-
-
-
-
- 0
-
-
@@ -2930,36 +2930,7 @@
- 7
- 2
- [@class
(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :)
{
protected:
(:include
- 1
-
- 0
-
- -44
-
-
- 2
- decl pre_indent="4":)
(:include
- 1
-
- 0
-
- -25
-
-
- 2
- decl pre_indent="4":)
};@]
+ 0
@@ -2970,45 +2941,7 @@
- 9
- 2
- [@template <class Tag,class T>
class
(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)
{
public:
(:include
- 1
-
- 0
-
- -50
-
-
- 2
- decl pre_indent="4":)
(:include
- 1
-
- 0
-
- -6
-
-
- 2
- decl pre_indent="4":)
(:include
- 1
-
- 0
-
- -45
-
-
- 2
- decl pre_indent="4":)
};@]
+ 0
@@ -3019,7 +2952,36 @@
- 0
+ 7
+ 2
+ [@class
(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :)
{
protected:
(:include
+ 1
+
+ 0
+
+ -45
+
+
+ 2
+ decl pre_indent="4":)
(:include
+ 1
+
+ 0
+
+ -26
+
+
+ 2
+ decl pre_indent="4":)
};@]
@@ -3030,7 +2992,45 @@
- 0
+ 9
+ 2
+ [@template <class Tag,class T>
class
(:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)
{
public:
(:include
+ 1
+
+ 0
+
+ -51
+
+
+ 2
+ decl pre_indent="4":)
(:include
+ 1
+
+ 0
+
+ -7
+
+
+ 2
+ decl pre_indent="4":)
(:include
+ 1
+
+ 0
+
+ -46
+
+
+ 2
+ decl pre_indent="4":)
};@]
@@ -3495,54 +3495,7 @@
- 11
- 2
- [@(:include
- 1
-
- 0
-
- -35
-
-
- 2
- def:)
(:include
- 1
-
- 0
-
- -36
-
-
- 2
- decl:)
typedef (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_throw_function,char const *> throw_function;
typedef (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_throw_file,char const *> throw_file;
typedef (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_throw_line,int> throw_line;@]
+ 0
@@ -3553,18 +3506,54 @@
- 3
+ 112[@(:include 10
- -29
+ -372
- decl:)@]
+ def:)
(:include
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ decl:)
typedef (:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)<struct tag_throw_function,char const *> throw_function;
typedef (:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)<struct tag_throw_file,char const *> throw_file;
typedef (:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)<struct tag_throw_line,int> throw_line;@]
@@ -3574,17 +3563,6 @@
-25
-
- 0
-
-
-
-
- 0
-
- -26
-
- 32
@@ -3593,7 +3571,7 @@
0
- -17
+ -312
@@ -3604,13 +3582,35 @@
0
- -27
+ -260
+
+
+ 0
+
+ -27
+
+
+
+ 3
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ decl:)@]
+
+ 0
@@ -3789,7 +3789,7 @@
0
- -27
+ -282
@@ -3858,6 +3858,17 @@
-48
+
+ 0
+
+
+
+
+ 0
+
+ -49
+
+ 32
@@ -3866,7 +3877,7 @@
0
- -15
+ -102
@@ -3877,7 +3888,7 @@
0
- -49
+ -50
@@ -3897,16 +3908,7 @@
0
- -53
-
-
- 2
- :)>
#include <(:link
- 1
-
- 0
-
- -23
+ -542
@@ -3924,16 +3926,7 @@
0
- -55
-
-
- 2
- :)>
#include <(:link
- 1
-
- 0
-
- -48
+ -252
@@ -3946,20 +3939,27 @@
2
+ :)>
#include <(:link
+ 1
+
+ 0
+
+ -49
+
+
+ 2
+ :)>
#include <(:link
+ 1
+
+ 0
+
+ -57
+
+
+ 2:)>@]
-
-
- 0
-
- -50
-
-
-
- 0
-
- 0
@@ -3968,18 +3968,7 @@
- 3
- 2
- [@(:include
- 1
-
- 0
-
- -8
-
-
- 2
- decl:)@]
+ 0
@@ -3990,7 +3979,18 @@
- 0
+ 3
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -11
+
+
+ 2
+ decl:)@]
@@ -4001,18 +4001,7 @@
- 3
- 2
- [@(:include
- 1
-
- 0
-
- -36
-
-
- 2
- decl:)@]
+ 0
@@ -4022,148 +4011,6 @@
-54
-
- 0
-
-
-
-
- 0
-
- -55
-
-
-
- 5
- 2
- [@(:include
- 1
-
- 0
-
- -36
-
-
- 2
- def:)
(:include
- 1
-
- 0
-
- -7
-
-
- 2
- decl:)@]
-
-
-
-
- 0
-
- -56
-
-
-
- 11
- 2
- [@(:include
- 1
-
- 0
-
- -28
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -9
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -14
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -22
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -33
-
-
- 2
- decl:)@]
-
-
-
-
- 0
-
- -57
-
-
-
- 5
- 2
- [@(:include
- 1
-
- 0
-
- -18
-
-
- 2
- decl:)
namespace
boost
{
(:include
- 1
-
- 0
-
- -32
-
-
- 2
- decl:)
}@]
-
-
-
-
- 0
-
- -58
-
-
-
- 0
-
-
-
-
- 0
-
- -59
-
- 32
@@ -4183,13 +4030,166 @@
0
- -60
+ -550
+
+
+ 0
+
+ -56
+
+
+
+ 5
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ def:)
(:include
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ decl:)@]
+
+
+
+
+ 0
+
+ -57
+
+
+
+ 11
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -30
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -5
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -35
+
+
+ 2
+ decl:)@]
+
+
+
+
+ 0
+
+ -58
+
+
+
+ 5
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -19
+
+
+ 2
+ decl:)
namespace
boost
{
(:include
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ decl:)
}@]
+
+
+
+
+ 0
+
+ -59
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -60
+
+
+
+ 3
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -29
+
+
+ 2
+ decl:)@]
+
+
@@ -4212,7 +4212,27 @@
- 0
+ 5
+ 2
+ [@template <class T>
(:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) (:link
+ 1
+
+ 0
+
+ -5
+
+
+ 2
+ :)( T const & e );@]
@@ -4223,27 +4243,7 @@
- 5
- 2
- [@(:link
- 1
-
- 0
-
- -6
-
-
- 2
- mod="m":)( (:link
- 1
-
- 0
-
- -50
-
-
- 2
- mod="m":) const & v );@]
+ 0
@@ -4256,7 +4256,7 @@
52
- [@template <class E, class Tag, class T>
E const & (:link
+ [@(:link 10
@@ -4265,16 +4265,16 @@
2
- mod="/":)( E const & x, (:link
+ mod="m":)( (:link 10
- -36
+ -512
- :)<Tag,T> const & v );@]
+ mod="m":) const & v );@]
@@ -4285,18 +4285,7 @@
- 3
- 2
- [@template <class T>
---unspecified--- (:link
- 1
-
- 0
-
- -8
-
-
- 2
- :)( T const & x );@]
+ 0
@@ -4307,9 +4296,9 @@
- 3
+ 52
- [@typedef ---unspecified--- (:link
+ [@template <class E, class Tag, class T>
E const & (:link 10
@@ -4318,7 +4307,16 @@
2
- :);@]
+ mod="/":)( E const & x, (:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)<Tag,T> const & v );@]
@@ -4329,7 +4327,36 @@
- 0
+ 7
+ 2
+ [@template <class E, class Tag1, class T1, ..., class TagN, class TN>
E const & (:link
+ 1
+
+ 0
+
+ -10
+
+
+ 2
+ mod="/":)( E const & x,
(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)<
(:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)<Tag1,T1>,
...,
(:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)<TagN,TN> > const & v );@]
@@ -4340,7 +4367,18 @@
- 0
+ 3
+ 2
+ [@template <class T>
---unspecified--- (:link
+ 1
+
+ 0
+
+ -11
+
+
+ 2
+ :)( T const & x );@]
@@ -4351,7 +4389,18 @@
- 0
+ 3
+ 2
+ [@typedef ---unspecified--- (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :);@]
@@ -4373,27 +4422,7 @@
- 5
- 2
- [@template <class T>
(:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) (:link
- 1
-
- 0
-
- -14
-
-
- 2
- :)( T const & e );@]
+ 0
@@ -4404,36 +4433,7 @@
- 7
- 2
- [@template <class E, class Tag1, class T1, ..., class TagN, class TN>
E const & (:link
- 1
-
- 0
-
- -15
-
-
- 2
- mod="/":)( E const & x,
(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)<
(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<Tag1,T1>,
...,
(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<TagN,TN> > const & v );@]
+ 0
@@ -4455,18 +4455,7 @@
- 3
- 2
- [@template <class T>
---unspecified--- (:link
- 1
-
- 0
-
- -17
-
-
- 2
- :)( T const & e );@]
+ 0
@@ -4477,18 +4466,9 @@
- 19
+ 32
- [@#if !defined( BOOST_EXCEPTION_DISABLE )
#include <(:link
- 1
-
- 0
-
- -23
-
-
- 2
- :)>
#include <boost/current_function.hpp>
#define (:link
+ [@template <class T>
---unspecified--- (:link 10
@@ -4497,70 +4477,7 @@
2
- :)(x)\
::boost::(:link
- 1
-
- 0
-
- -32
-
-
- 2
- :)( ::boost::(:link
- 1
-
- 0
-
- -8
-
-
- 2
- :)(x) <<\
::boost::(:link
- 1
-
- 0
-
- -23
-
-
- 2
- |throw_function:)(BOOST_CURRENT_FUNCTION) <<\
::boost::(:link
- 1
-
- 0
-
- -23
-
-
- 2
- |throw_file:)(__FILE__) <<\
::boost::(:link
- 1
-
- 0
-
- -23
-
-
- 2
- |throw_line:)((int)__LINE__) )
#else
#define (:link
- 1
-
- 0
-
- -18
-
-
- 2
- :)(x) ::boost::(:link
- 1
-
- 0
-
- -32
-
-
- 2
- :)(x)
#endif@]
+ :)( T const & e );@]
@@ -4571,7 +4488,90 @@
- 0
+ 19
+ 2
+ [@#if !defined( BOOST_EXCEPTION_DISABLE )
#include <(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :)>
#include <boost/current_function.hpp>
#define (:link
+ 1
+
+ 0
+
+ -19
+
+
+ 2
+ :)(x)\
::boost::(:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :)( ::boost::(:link
+ 1
+
+ 0
+
+ -11
+
+
+ 2
+ :)(x) <<\
::boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ |throw_function:)(BOOST_CURRENT_FUNCTION) <<\
::boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ |throw_file:)(__FILE__) <<\
::boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ |throw_line:)((int)__LINE__) )
#else
#define (:link
+ 1
+
+ 0
+
+ -19
+
+
+ 2
+ :)(x) ::boost::(:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :)(x)
#endif@]
@@ -4615,27 +4615,7 @@
- 5
- 2
- [@(:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :)();@]
+ 0
@@ -4646,7 +4626,27 @@
- 0
+ 5
+ 2
+ [@(:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :)();@]
@@ -4668,18 +4668,7 @@
- 3
- 2
- [@(:link
- 1
-
- 0
-
- -25
-
-
- 2
- mod="m":)();@]
+ 0
@@ -4690,7 +4679,18 @@
- 0
+ 3
+ 2
+ [@(:link
+ 1
+
+ 0
+
+ -26
+
+
+ 2
+ mod="m":)();@]
@@ -4701,18 +4701,7 @@
- 3
- 2
- [@std::string (:link
- 1
-
- 0
-
- -27
-
-
- 2
- :)();@]
+ 0
@@ -4723,9 +4712,9 @@
- 5
+ 32
- [@class
(:link
+ [@std::string (:link 10
@@ -4734,16 +4723,7 @@
2
- :):
public std::exception
public boost::
- 1
-
- 0
-
- -35
-
-
- 2
-
{
---unspecified---
};@]
+ :)();@]
@@ -4754,18 +4734,9 @@
- 5
+ 32
- [@template <class ErrorInfo,class E>
typename ErrorInfo::(:link
- 1
-
- 0
-
- -50
-
-
- 2
- mod="m":) const * (:link
+ [@template <class E>
E * 10
@@ -4774,7 +4745,7 @@
2
- :)( E const & x );@]
+ ();@]
@@ -4785,7 +4756,27 @@
- 0
+ 5
+ 2
+ [@class
(:link
+ 1
+
+ 0
+
+ -30
+
+
+ 2
+ :):
public std::exception
public boost::
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+
{
---unspecified---
};@]
@@ -4796,7 +4787,27 @@
- 0
+ 5
+ 2
+ [@template <class ErrorInfo,class E>
typename ErrorInfo::(:link
+ 1
+
+ 0
+
+ -51
+
+
+ 2
+ mod="m":) const * (:link
+ 1
+
+ 0
+
+ -31
+
+
+ 2
+ :)( E const & x );@]
@@ -4807,27 +4818,7 @@
- 5
- 2
- [@#ifdef BOOST_NO_EXCEPTIONS
void (:link
- 1
-
- 0
-
- -32
-
-
- 2
- :)( std::exception const & e ); // user defined
#else
template <class E>
void (:link
- 1
-
- 0
-
- -32
-
-
- 2
- :)( E const & e );
#endif@]
+ 0
@@ -4838,27 +4829,7 @@
- 5
- 2
- [@void (:link
- 1
-
- 0
-
- -33
-
-
- 2
- :)( (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) const & ep );
+ 0
@@ -4869,7 +4840,27 @@
- 0
+ 5
+ 2
+ [@#ifdef BOOST_NO_EXCEPTIONS
void (:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :)( std::exception const & e ); // user defined
#else
template <class E>
void (:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :)( E const & e );
#endif@]
@@ -4880,9 +4871,9 @@
- 3
+ 52
- [@class (:link
+ [@void (:link 10
@@ -4891,7 +4882,16 @@
2
- :);@]
+ :)( (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) const & ep );
@@ -4902,18 +4902,7 @@
- 3
- 2
- [@template <class Tag,class T>
class (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :);@]
+ 0
@@ -4924,7 +4913,18 @@
- 0
+ 3
+ 2
+ [@class (:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :);@]
@@ -4937,7 +4937,7 @@
32
- [@template <class E>
E *
+ [@template <class Tag,class T>
class (:link 10
@@ -4946,7 +4946,7 @@
2
- ();@]
+ :);@]
@@ -5012,36 +5012,7 @@
- 7
- 2
- [@(:link
- 1
-
- 0
-
- -44
-
-
- 2
- mod="m":)();
(:link
- 1
-
- 0
-
- -44
-
-
- 2
- mod="m":)( (:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) const & x );@]
+ 0
@@ -5052,19 +5023,10 @@
- 5
+ 72[@(:link 1
-
- 0
-
- -50
-
-
- 2
- mod="m":) const & (:link
- 10
@@ -5072,7 +5034,25 @@
2
- mod="m":)() const;@]
+ mod="m":)();
(:link
+ 1
+
+ 0
+
+ -45
+
+
+ 2
+ mod="m":)( (:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) const & x );@]
@@ -5083,7 +5063,27 @@
- 0
+ 5
+ 2
+ [@(:link
+ 1
+
+ 0
+
+ -51
+
+
+ 2
+ mod="m":) const & (:link
+ 1
+
+ 0
+
+ -46
+
+
+ 2
+ mod="m":)() const;@]
@@ -5127,18 +5127,7 @@
- 3
- 2
- [@typedef T (:link
- 1
-
- 0
-
- -50
-
-
- 2
- mod="m":);@]
+ 0
@@ -5149,7 +5138,18 @@
- 0
+ 3
+ 2
+ [@typedef T (:link
+ 1
+
+ 0
+
+ -51
+
+
+ 2
+ mod="m":);@]
@@ -5272,6 +5272,37 @@
-5
+
+ 5
+ 2
+ (:auto !!!:)
(:include synopsis:)
!!!!Effects:
As if
[@try
{
throw
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ (e);
}
catch(...)
{
return (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :)();
}@]
+
+
+
+
+ 0
+
+ -6
+
+ 112
@@ -5280,7 +5311,7 @@
0
- -35
+ -372
@@ -5289,7 +5320,7 @@
0
- -35
+ -372
@@ -5298,7 +5329,7 @@
0
- -43
+ -442
@@ -5316,7 +5347,7 @@
0
- -39
+ -222
@@ -5327,7 +5358,7 @@
0
- -6
+ -7
@@ -5338,53 +5369,13 @@
0
- -36
+ -382 object.
(:include throws:)
-
-
- 0
-
- -7
-
-
-
- 7
- 2
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
E must be boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :), or a type that derives (indirectly) from boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :).
!!!!Effects:
Stores a copy of v into x. If x already contains data of type (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<Tag,T>, that data is overwritten.
!!!!Returns:
x.
(:include throws:)
-
- 0
@@ -5392,122 +5383,6 @@
-8
-
- 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
-
- -35
-
-
- 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
-
- -35
-
-
- 2
- :). The T sub-object is initialized from x by the T copy constructor.
!!!!Throws:
Nothing.
-
-
-
-
- 0
-
- -9
-
-
-
- 17
- 2
- (:auto !!!:)
(:include synopsis:)
The (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :)'s operations do not throw.
Two instances of (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) are equivalent and compare equal if and only if they refer to the same exception.
The default constructor of (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) produces the null value of the type. The null value is equivalent only to itself.
!!!!Thread safety
* It is legal for multiple threads to hold (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) references to the same exception object.
* It is illegal for multiple threads to modify the same (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) object concurrently.
* While calling (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :) makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call (:link
- 1
-
- 0
-
- -33
-
-
- 2
- :) concurrently to throw the same exception object into multiple threads.
-
-
-
-
- 0
-
- -10
-
- 572
@@ -5516,7 +5391,7 @@
0
- -35
+ -372
@@ -5525,7 +5400,7 @@
0
- -36
+ -382
@@ -5534,7 +5409,7 @@
0
- -7
+ -92
@@ -5543,7 +5418,7 @@
0
- -7
+ -92
@@ -5552,7 +5427,7 @@
0
- -7
+ -92
@@ -5561,7 +5436,7 @@
0
- -36
+ -382
@@ -5570,138 +5445,12 @@
0
- -35
+ -372:) & e )
{
e (:link 1
-
- 0
-
- -7
-
-
- 2
- |<<:) foo_info(foo);
throw e; //Compile error: boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) is abstract
}@]
The correct code is:
[@catch( boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) & e )
{
e (:link
- 1
-
- 0
-
- -7
-
-
- 2
- |<<:) foo_info(foo);
throw; //Okay, re-throwing the original exception object.
}@]
!!!Why doesn't boost::exception derive from std::exception?
Despite that (:link
- 1
-
- 0
-
- -34
-
-
- 2
- |virtual inheritance should be used in deriving from base exception types:), many programmers fail to follow this principle when deriving from std::exception. If boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) derives from std::exception, using the
- 1
-
- 0
-
- -8
-
-
- 2
- function with such user-defined types would introduce dangerous ambiguity which would break all catch(std::exception &) statements.
Of course, boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) should not be used to replace std::exception as a base type in exception type hierarchies. Instead, it should be included as a virtual base, in addition to std::exception (which should also be derived virtually.)
!!!What is the space overhead of the boost::exception base class?
The space overhead for the boost::exception data members is negligible in the context of exception handling. Throwing objects that derive from boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) does not by itself cause dynamic memory allocations.
Deriving from boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) enables any data to be added to exceptions, which usually does allocate memory. However, this memory is reclaimed when the exception has been handled, and since typically user code does not allocate memory during the unrolling of the stack, adding error info to exceptions should not cause memory fragmentation.
!!!Why is boost::exception integrated in boost::throw_exception?
The boost::(:link
- 1
-
- 0
-
- -32
-
-
- 2
- :) function predates the Boost Exception library and there has been some concern about its current behavior of injecting boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) as a base of any exception passed to boost::(:link
- 1
-
- 0
-
- -32
-
-
- 2
- :). Such concerns are dictated by the typical strict interpretation of a common principle in C and C++, that users only pay for features they actually use.
The problem is that users of Boost Exception can't by themselves cause a library to throw types that derive from boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :), and without this they can't use any of the Boost Exception facilities.
For example, if a user wants to use Boost Serialization in a separate thread, it is desirable to be able to transport exceptions emitted by that library into the main thread where they can be analyzed to generate a user-friendly message. This can be easily achieved using boost::(:link
- 10
@@ -5709,12 +5458,138 @@
2
+ |<<:) foo_info(foo);
throw e; //Compile error: boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) is abstract
}@]
The correct code is:
[@catch( boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) & e )
{
e (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ |<<:) foo_info(foo);
throw; //Okay, re-throwing the original exception object.
}@]
!!!Why doesn't boost::exception derive from std::exception?
Despite that (:link
+ 1
+
+ 0
+
+ -36
+
+
+ 2
+ |virtual inheritance should be used in deriving from base exception types:), many programmers fail to follow this principle when deriving from std::exception. If boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) derives from std::exception, using the
+ 1
+
+ 0
+
+ -11
+
+
+ 2
+ function with such user-defined types would introduce dangerous ambiguity which would break all catch(std::exception &) statements.
Of course, boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) should not be used to replace std::exception as a base type in exception type hierarchies. Instead, it should be included as a virtual base, in addition to std::exception (which should also be derived virtually.)
!!!What is the space overhead of the boost::exception base class?
The space overhead for the boost::exception data members is negligible in the context of exception handling. Throwing objects that derive from boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) does not by itself cause dynamic memory allocations.
Deriving from boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) enables any data to be added to exceptions, which usually does allocate memory. However, this memory is reclaimed when the exception has been handled, and since typically user code does not allocate memory during the unrolling of the stack, adding error info to exceptions should not cause memory fragmentation.
!!!Why is boost::exception integrated in boost::throw_exception?
The boost::(:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :) function predates the Boost Exception library and there has been some concern about its current behavior of injecting boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) as a base of any exception passed to boost::(:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :). Such concerns are dictated by the typical strict interpretation of a common principle in C and C++, that users only pay for features they actually use.
The problem is that users of Boost Exception can't by themselves cause a library to throw types that derive from boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :), and without this they can't use any of the Boost Exception facilities.
For example, if a user wants to use Boost Serialization in a separate thread, it is desirable to be able to transport exceptions emitted by that library into the main thread where they can be analyzed to generate a user-friendly message. This can be easily achieved using boost::(:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2:), but this requires that Boost Serialization throws exceptions using boost::(:link 10
- -17
+ -182
@@ -5723,7 +5598,7 @@
0
- -32
+ -342
@@ -5732,7 +5607,7 @@
0
- -18
+ -192
@@ -5759,7 +5634,7 @@
0
- -18
+ -192
@@ -5770,383 +5645,47 @@
0
- -11
+ -972
- (:auto !!!:)
Deriving from boost::(:link
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
E must be boost::(:link 10
- -35
+ -372
- :) effectively decouples the semantics of a failure from the information that is relevant to each individual instance of reporting a failure with a given semantic.
In other words: with boost::(:link
+ :), or a type that derives (indirectly) from boost::(:link 10
- -35
+ -372
- :), what data a given exception object transports depends primarily on the context in which failures are reported (not on its type.) Since exception types need no members, it becomes very natural to throw exceptions that derive from more than one type to indicate multiple appropriate semantics:
[@struct exception_base: virtual std::exception, virtual boost::(:link
+ :).
!!!!Effects:
Stores a copy of v into x. If x already contains data of type (:link 10
- -35
+ -382
- :) { };
struct io_error: virtual exception_base { };
struct file_error: virtual io_error { };
struct read_error: virtual io_error { };
struct file_read_error: virtual file_error, virtual read_error { };@]
Using this approach, exception types become a simple tagging system for categorizing errors and selecting failures in exception handlers.
+ :)<Tag,T>, that data is overwritten.
!!!!Returns:
x.
(:include throws:)
0
- -12
-
-
-
- 27
- 2
- (:auto !!:)
Some exception hierarchies can not be modified to make boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) a base type. In this case, the (:link
- 1
-
- 0
-
- -8
-
-
- 2
- :) function template can be used to make exception objects derive from boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) anyway. Here is an example:
[@#include <(:link
- 1
-
- 0
-
- -49
-
-
- 2
- :)>
#include <stdexcept>
typedef boost::(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_std_range_min,size_t> std_range_min;
typedef boost::(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_std_range_max,size_t> std_range_max;
typedef boost::(:link
- 1
-
- 0
-
- -36
-
-
- 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
-
- -8
-
-
- 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
-
- -8
-
-
- 2
- :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link
- 1
-
- 0
-
- -35
-
-
- 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
-
- -35
-
-
- 2
- :) &, so that (:link
- 1
-
- 0
-
- -5
-
-
- 2
- |more information can be added to the exception at a later time:).
-
-
-
-
- 0
-
- -13
-
-
-
- 37
- 2
- (:auto !!!:)
When you catch an exception, you can call (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :) to get an (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) object:
[@#include <(:link
- 1
-
- 0
-
- -56
-
-
- 2
- :)>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
void do_work(); //throws cloning-enabled boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :)s
void
worker_thread( boost::(:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) & error )
{
try
{
do_work();
error = boost::(:link
- 1
-
- 0
-
- -9
-
-
- 2
- :)();
}
catch(
... )
{
error = boost::(:link
- 1
-
- 0
-
- -22
-
-
- 2
- :)();
}
}@]
In the above example, note that (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :) captures the original type of the exception object. The exception can be thrown again using the (:link
- 1
-
- 0
-
- -33
-
-
- 2
- :) function:
[@// ...continued
void
work()
{
boost::(:link
- 1
-
- 0
-
- -9
-
-
- 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
-
- -33
-
-
- 2
- :)(error);
}@]
Note that (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :) could fail to copy the original exception object in the following cases:
* if there is not enough memory, in which case the returned (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) points to an instance of std::bad_alloc, or
* if (:link
- 1
-
- 0
-
- -17
-
-
- 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
-
- -9
-
-
- 2
- :) points to an instance of (:link
- 1
-
- 0
-
- -28
-
-
- 2
- :).
Regardless, the use of (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :) and (:link
- 1
-
- 0
-
- -33
-
-
- 2
- :) in the above examples is well-formed.
-
-
-
-
- 0
-
- -14
-
-
-
- 5
- 2
- (:auto !!!:)
(:include synopsis:)
!!!!Effects:
As if
[@try
{
throw
- 1
-
- 0
-
- -17
-
-
- 2
- (e);
}
catch(...)
{
return (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :)();
}@]
-
-
-
-
- 0
-
- -15
+ -10
@@ -6157,7 +5696,7 @@
0
- -35
+ -372
@@ -6166,7 +5705,7 @@
0
- -35
+ -372
@@ -6177,31 +5716,107 @@
0
- -16
+ -11
- 15
+ 52
- (: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:)
!!!!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 10
- -29
+ -372
- :) function template can be called with any exception type. If BOOST_NO_RTTI is defined, (:link
+ :), 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 10
- -29
+ -372
- :) can be used only with objects of type boost::(:link
+ :). The T sub-object is initialized from x by the T copy constructor.
!!!!Throws:
Nothing.
+
+
+
+
+ 0
+
+ -12
+
+
+
+ 17
+ 2
+ (:auto !!!:)
(:include synopsis:)
The (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :)'s operations do not throw.
Two instances of (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) are equivalent and compare equal if and only if they refer to the same exception.
The default constructor of (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) produces the null value of the type. The null value is equivalent only to itself.
!!!!Thread safety
* It is legal for multiple threads to hold (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) references to the same exception object.
* It is illegal for multiple threads to modify the same (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) object concurrently.
* While calling (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call (:link 10
@@ -6210,34 +5825,208 @@
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
+ :) concurrently to throw the same exception object into multiple threads.
+
+
+
+
+ 0
+
+ -13
+
+
+
+ 7
+ 2
+ (:auto !!!:)
Deriving from boost::(:link 10
- -17
+ -372
- :) and (:link
+ :) 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 10
- -8
+ -372
- :) are integrated directly in the (:link
+ :), 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 10
- -32
+ -372
- :) 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
+ :) { };
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
+
+ -14
+
+
+
+ 27
+ 2
+ (:auto !!:)
Some exception hierarchies can not be modified to make boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 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
+
+ -37
+
+
+ 2
+ :) anyway. Here is an example:
[@#include <(:link
+ 1
+
+ 0
+
+ -50
+
+
+ 2
+ :)>
#include <stdexcept>
typedef boost::(:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)<struct tag_std_range_min,size_t> std_range_min;
typedef boost::(:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)<struct tag_std_range_max,size_t> std_range_max;
typedef boost::(:link
+ 1
+
+ 0
+
+ -38
+
+
+ 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
+
+ -37
+
+
+ 2
+ :) and T. This makes it possible to use (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 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
+
+ -37
+
+
+ 2
+ :) &, so that (:link
+ 1
+
+ 0
+
+ -6
+
+
+ 2
+ |more information can be added to the exception at a later time:).
+
+
+
+
+ 0
+
+ -15
+
+
+
+ 37
+ 2
+ (:auto !!!:)
When you catch an exception, you can call (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) to get an (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) object:
[@#include <(:link 10
@@ -6246,92 +6035,52 @@
2
- :).
-
-
-
-
- 0
-
- -17
-
-
-
- 21
- 2
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
T must be a class with an accessible no-throw copy constructor.
!!!!Returns:
An object of ''unspecified'' type which derives publicly from T. That is, the returned object can be intercepted by a catch(T &).
!!!!Description:
This function is designed to be used directly in a throw-expression to enable the (:link
+ :)>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
void do_work(); //throws cloning-enabled boost::(:link 10
- -9
+ -372
- :) support in Boost Exception. For example:
[@class
my_exception:
public std::exception
{
};
....
throw boost::(:link
+ :)s
void
worker_thread( boost::(:link 10
- -17
+ -122
- :)(my_exception());@]
Unless (:link
+ :) & error )
{
try
{
do_work();
error = boost::(:link 10
- -17
+ -122
- :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link
+ :)();
}
catch(
... )
{
error = boost::(:link 10
- -22
+ -232
- :) may return an (:link
+ :)();
}
}@]
In the above example, note that (:link 10
- -9
+ -232
- :) which refers to an instance of (:link
- 1
-
- 0
-
- -28
-
-
- 2
- :). See (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :) for details.
!!!!Note:
Instead of using the throw keyword directly, it is preferable to call boost::(:link
- 1
-
- 0
-
- -32
-
-
- 2
- :). This is guaranteed to throw an exception that derives from boost::(:link
+ :) captures the original type of the exception object. The exception can be thrown again using the (:link 10
@@ -6340,63 +6089,95 @@
2
- :) and supports the (:link
+ :) function:
[@// ...continued
void
work()
{
boost::(:link 10
- -9
+ -122
- :) functionality.
+ :) 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
+
+ -35
+
+
+ 2
+ :)(error);
}@]
Note that (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 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
+
+ -12
+
+
+ 2
+ :) points to an instance of std::bad_alloc, or
* if (:link
+ 1
+
+ 0
+
+ -18
+
+
+ 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
+
+ -12
+
+
+ 2
+ :) points to an instance of (:link
+ 1
+
+ 0
+
+ -30
+
+
+ 2
+ :).
Regardless, the use of (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) and (:link
+ 1
+
+ 0
+
+ -35
+
+
+ 2
+ :) in the above examples is well-formed.
0
- -18
-
-
-
- 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
-
- -32
-
-
- 2
- . To recover this information at the catch site, use
- 1
-
- 0
-
- -29
-
-
- 2
- ; the information is also included in the message returned by
- 1
-
- 0
-
- -21
-
-
- 2
- .
-
-
-
-
- 0
-
- -19
+ -16
@@ -6407,7 +6188,7 @@
0
- -35
+ -372
@@ -6416,7 +6197,7 @@
0
- -35
+ -372
@@ -6425,7 +6206,7 @@
0
- -36
+ -382
@@ -6434,7 +6215,7 @@
0
- -7
+ -92
@@ -6443,7 +6224,7 @@
0
- -35
+ -372
@@ -6452,7 +6233,7 @@
0
- -36
+ -382
@@ -6461,7 +6242,7 @@
0
- -35
+ -372
@@ -6470,7 +6251,7 @@
0
- -7
+ -92
@@ -6479,7 +6260,7 @@
0
- -35
+ -372
@@ -6488,7 +6269,7 @@
0
- -7
+ -92
@@ -6497,7 +6278,7 @@
0
- -35
+ -372
@@ -6506,7 +6287,7 @@
0
- -29
+ -312
@@ -6515,7 +6296,7 @@
0
- -29
+ -312
@@ -6533,7 +6314,7 @@
0
- -36
+ -382
@@ -6542,13 +6323,250 @@
0
- -35
+ -372:). This is useful for inclusion in logs and other diagnostic objects.
+
+
+ 0
+
+ -17
+
+
+
+ 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
+
+ -31
+
+
+ 2
+ :) function template can be called with any exception type. If BOOST_NO_RTTI is defined, (:link
+ 1
+
+ 0
+
+ -31
+
+
+ 2
+ :) can be used only with objects of type boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 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
+
+ -18
+
+
+ 2
+ :) and (:link
+ 1
+
+ 0
+
+ -11
+
+
+ 2
+ :) are integrated directly in the (:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :) function. Defining BOOST_EXCEPTION_DISABLE disables this integration.
Note that on some non-conformant compilers, for example MSVC 7.0 and older, as well as BCC, BOOST_EXCEPTION_DISABLE is implicitly defined in (:link
+ 1
+
+ 0
+
+ -58
+
+
+ 2
+ :).
'''BOOST_NO_EXCEPTIONS'''
This macro disables exception handling in Boost, forwarding all exceptions to a user-defined non-template version of boost::
+ 1
+
+ 0
+
+ -34
+
+
+ 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
+
+ -21
+
+
+ 2
+ (of course under BOOST_NO_EXCEPTIONS, the user-defined boost::throw_exception is not allowed to return to the caller.)
+
+
+
+
+ 0
+
+ -18
+
+
+
+ 21
+ 2
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
T must be a class with an accessible no-throw copy constructor.
!!!!Returns:
An object of ''unspecified'' type which derives publicly from T. That is, the returned object can be intercepted by a catch(T &).
!!!!Description:
This function is designed to be used directly in a throw-expression to enable the (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) support in Boost Exception. For example:
[@class
my_exception:
public std::exception
{
};
....
throw boost::(:link
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ :)(my_exception());@]
Unless (:link
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) may return an (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) which refers to an instance of (:link
+ 1
+
+ 0
+
+ -30
+
+
+ 2
+ :). See (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) for details.
!!!!Note:
Instead of using the throw keyword directly, it is preferable to call boost::(:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :). This is guaranteed to throw an exception that derives from boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) and supports the (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) functionality.
+
+
+
+
+ 0
+
+ -19
+
+
+
+ 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
+
+ -34
+
+
+ 2
+ . To recover this information at the catch site, use
+ 1
+
+ 0
+
+ -31
+
+
+ 2
+ ; the information is also included in the message returned by
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ .
+
+ 0
@@ -6573,7 +6591,7 @@
0
- -35
+ -372
@@ -6582,7 +6600,7 @@
0
- -35
+ -372
@@ -6591,7 +6609,7 @@
0
- -7
+ -92
@@ -6600,7 +6618,7 @@
0
- -49
+ -502
@@ -6609,7 +6627,7 @@
0
- -35
+ -372
@@ -6618,7 +6636,7 @@
0
- -35
+ -372
@@ -6636,7 +6654,7 @@
0
- -60
+ -432
@@ -6658,7 +6676,7 @@
0
- -35
+ -372
@@ -6667,7 +6685,7 @@
0
- -36
+ -382
@@ -6676,7 +6694,7 @@
0
- -35
+ -372
@@ -6685,7 +6703,7 @@
0
- -7
+ -92
@@ -6694,7 +6712,7 @@
0
- -35
+ -372
@@ -6712,7 +6730,7 @@
0
- -36
+ -382
@@ -6721,7 +6739,7 @@
0
- -36
+ -382
@@ -6730,7 +6748,7 @@
0
- -36
+ -382
@@ -6739,7 +6757,7 @@
0
- -45
+ -462
@@ -6748,7 +6766,7 @@
0
- -45
+ -462
@@ -6766,7 +6784,7 @@
0
- -36
+ -382
@@ -6775,7 +6793,7 @@
0
- -60
+ -432
@@ -6790,135 +6808,63 @@
- 29
+ 132
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
The (:link
+ (:auto !!!:)
The code snippet below demonstrates how boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) can be used to bundle the name of the function that failed, together with the reported errno so that they can be added to exception objects more conveniently together:
[@#include <(:link 10
- -22
+ -492
- :) function must not be called outside of a catch block.
!!!!Returns:
* An (:link
+ :)>
#include <boost/shared_ptr.hpp>
#include <stdio.h>
#include <string>
#include <errno.h>
typedef boost::(:link 10
- -9
+ -382
- :) that refers to the currently handled exception or a copy of the currently handled exception.
* If the function needs to allocate memory and the attempt fails, it returns an (:link
+ :)<struct tag_file_name,std::string> file_name_info;
typedef boost::(:link 10
- -9
+ -382
- :) that refers to an instance of std::bad_alloc.
!!!!Throws:
Nothing.
!!!!Notes:
* It is unspecified whether the return values of two successive calls to (:link
+ :)<struct tag_function,char const *> function_info;
typedef boost::(:link 10
- -22
+ -382
- :) refer to the same exception object.
* Correct implementation of (:link
+ :)<struct tag_errno,int> errno_info;
typedef boost::tuple<function_info,errno_info> clib_failure;
class file_open_error: public boost::(:link 10
- -22
+ -372
- :) may require compiler support, unless (:link
+ :) { };
boost::shared_ptr<FILE>
file_open( char const * name, char const * mode )
{
if( FILE * f=fopen(name,mode) )
return boost::shared_ptr<FILE>(f,fclose);
else
throw file_open_error() <<
file_name_info(name) <<
clib_failure("fopen",errno);
}@]
Note that the members of a boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) are stored separately in exception objects; they can only be retrieved individually, using (:link 10
- -17
+ -312
- :) was used at the time the currently handled exception object was passed to throw. If (:link
- 1
-
- 0
-
- -17
-
-
- 2
- :) was not used, and if the compiler does not provide the necessary support, then (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :) may return an (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) that refers to an instance of (:link
- 1
-
- 0
-
- -28
-
-
- 2
- :). In this case, if the original exception object derives from boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :), then the boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) sub-object of the (:link
- 1
-
- 0
-
- -28
-
-
- 2
- :) object is initialized by the boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) copy constructor.
+ :).
@@ -6929,9 +6875,135 @@
- 1
+ 292
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
The (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) function must not be called outside of a catch block.
!!!!Returns:
* An (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) that refers to the currently handled exception or a copy of the currently handled exception.
* If the function needs to allocate memory and the attempt fails, it returns an (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) that refers to an instance of std::bad_alloc.
!!!!Throws:
Nothing.
!!!!Notes:
* It is unspecified whether the return values of two successive calls to (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) refer to the same exception object.
* Correct implementation of (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) may require compiler support, unless (:link
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ :) was used at the time the currently handled exception object was passed to throw. If (:link
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ :) was not used, and if the compiler does not provide the necessary support, then (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :) may return an (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :) that refers to an instance of (:link
+ 1
+
+ 0
+
+ -30
+
+
+ 2
+ :). In this case, if the original exception object derives from boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :), then the boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) sub-object of the (:link
+ 1
+
+ 0
+
+ -30
+
+
+ 2
+ :) object is initialized by the boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) copy constructor.
@@ -6954,6 +7026,19 @@
-25
+
+ 1
+ 2
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
+
+
+
+
+ 0
+
+ -26
+
+ 32
@@ -6962,7 +7047,7 @@
0
- -35
+ -372
@@ -6973,7 +7058,7 @@
0
- -26
+ -27
@@ -6986,7 +7071,7 @@
0
- -27
+ -28
@@ -6997,7 +7082,7 @@
0
- -35
+ -372
@@ -7015,7 +7100,7 @@
0
- -27
+ -282
@@ -7024,44 +7109,13 @@
0
- -27
+ -282();
}
}@]
-
-
- 0
-
- -28
-
-
-
- 5
- 2
- (:auto !!!:)
(:include synopsis:)
This type is used by the (:link
- 1
-
- 0
-
- -9
-
-
- 2
- :) support in Boost Exception. Please see (:link
- 1
-
- 0
-
- -22
-
-
- 2
- :).
-
- 0
@@ -7070,63 +7124,9 @@
- 13
+ 12
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
* ErrorInfo must be an instance of the (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :) template.
* E must be polymorphic.
!!!!Returns:
* If dynamic_cast<boost::(:link
- 1
-
- 0
-
- -35
-
-
- 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
-
- -29
-
-
- 2
- :) become invalid.
!!!!Throws:
Nothing.
!!!!Note:
The interface of (:link
- 1
-
- 0
-
- -29
-
-
- 2
- :) may be affected by the build (:link
- 1
-
- 0
-
- -16
-
-
- 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.
@@ -7137,45 +7137,9 @@
- 69
+ 52
- !!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
-
- -31
-
-
- 2
- |copying:) of exception objects, implemented non-intrusively and automatically by the boost::(:link
- 1
-
- 0
-
- -32
-
-
- 2
- :) function.
!!Contents
#(:link
- 1
-
- 0
-
- -19
-
-
- 2
- :)
#Tutorial
##(:link
- 1
-
- 0
-
- -5
-
-
- 2
- mod="w":)
##(:link
+ (:auto !!!:)
(:include synopsis:)
This type is used by the (:link 10
@@ -7184,7 +7148,56 @@
2
- mod="w":)
##(:link
+ :) support in Boost Exception. Please see (:link
+ 1
+
+ 0
+
+ -23
+
+
+ 2
+ :).
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 13
+ 2
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
* ErrorInfo must be an instance of the (:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :) template.
* E must be polymorphic.
!!!!Returns:
* If dynamic_cast<boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 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
+
+ -9
+
+
+ 2
+ mod="/":) to store values in exception objects.) When x is destroyed, any pointers returned by (:link 10
@@ -7193,12 +7206,70 @@
2
- mod="w":)
##(:link
+ :) become invalid.
!!!!Throws:
Nothing.
!!!!Note:
The interface of (:link 10
- -11
+ -31
+
+
+ 2
+ :) may be affected by the build (:link
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ :).
+
+
+
+
+ 0
+
+ -32
+
+
+
+ 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
+
+ -33
+
+
+ 2
+ |copying:) of exception objects, implemented non-intrusively and automatically by the boost::(:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :) function.
!!Contents
#(:link
+ 1
+
+ 0
+
+ -16
+
+
+ 2
+ :)
#Tutorial
##(:link
+ 1
+
+ 0
+
+ -62
@@ -7207,7 +7278,34 @@
0
- -34
+ -14
+
+
+ 2
+ mod="w":)
##(:link
+ 1
+
+ 0
+
+ -33
+
+
+ 2
+ mod="w":)
##(:link
+ 1
+
+ 0
+
+ -13
+
+
+ 2
+ mod="w":)
##(:link
+ 1
+
+ 0
+
+ -362
@@ -7225,7 +7323,7 @@
0
- -35
+ -372
@@ -7234,7 +7332,7 @@
0
- -18
+ -192
@@ -7243,7 +7341,7 @@
0
- -32
+ -342
@@ -7252,48 +7350,12 @@
0
- -36
+ -382:)
###(:link 1
-
- 0
-
- -7
-
-
- 2
- :)
###(:link
- 1
-
- 0
-
- -15
-
-
- 2
- :)
###(:link
- 1
-
- 0
-
- -29
-
-
- 2
- :)
###(:link
- 1
-
- 0
-
- -8
-
-
- 2
- :)
##(:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:) Transporting of Exceptions between Threads
###(:link
- 10
@@ -7306,7 +7368,7 @@
0
- -17
+ -102
@@ -7315,7 +7377,7 @@
0
- -22
+ -312
@@ -7324,7 +7386,16 @@
0
- -14
+ -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
+
+ -122
@@ -7333,7 +7404,7 @@
0
- -33
+ -182
@@ -7342,7 +7413,34 @@
0
- -28
+ -23
+
+
+ 2
+ :)
###(:link
+ 1
+
+ 0
+
+ -5
+
+
+ 2
+ :)
###(:link
+ 1
+
+ 0
+
+ -35
+
+
+ 2
+ :)
###(:link
+ 1
+
+ 0
+
+ -302
@@ -7360,7 +7458,7 @@
0
- -27
+ -282
@@ -7369,39 +7467,12 @@
0
- -38
+ -292:)
#API
##(:link 1
-
- 0
-
- -46
-
-
- 2
- :)
##(:link
- 1
-
- 0
-
- -52
-
-
- 2
- :)
##(:link
- 1
-
- 0
-
- -40
-
-
- 2
- :)
##(:link
- 10
@@ -7414,7 +7485,7 @@
0
- -54
+ -532
@@ -7423,7 +7494,34 @@
0
- -16
+ -39
+
+
+ 2
+ :)
##(:link
+ 1
+
+ 0
+
+ -48
+
+
+ 2
+ :)
##(:link
+ 1
+
+ 0
+
+ -55
+
+
+ 2
+ :)
##(:link
+ 1
+
+ 0
+
+ -172
@@ -7432,7 +7530,7 @@
0
- -10
+ -82
@@ -7441,7 +7539,7 @@
0
- -58
+ -592
@@ -7452,7 +7550,7 @@
0
- -31
+ -33
@@ -7463,7 +7561,7 @@
0
- -17
+ -182
@@ -7472,7 +7570,7 @@
0
- -32
+ -342
@@ -7481,7 +7579,7 @@
0
- -35
+ -372
@@ -7490,7 +7588,7 @@
0
- -37
+ -402
@@ -7499,7 +7597,7 @@
0
- -13
+ -152
@@ -7510,18 +7608,18 @@
0
- -32
+ -34
- 13
+ 172(:auto !!!:)
(:include synopsis:)
!!!!Requirements:
E must derive publicly from std::exception.
!!!!Effects:
* If BOOST_NO_EXCEPTIONS is not defined, boost::(:link 10
- -32
+ -342
@@ -7530,7 +7628,7 @@
0
- -17
+ -182
@@ -7539,7 +7637,7 @@
0
- -8
+ -112
@@ -7548,7 +7646,7 @@
0
- -32
+ -342
@@ -7557,7 +7655,7 @@
0
- -32
+ -342
@@ -7566,18 +7664,36 @@
0
- -32
+ -342
- :) returns, the behavior is undefined.
+ :) 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
+
+ -31
+
+
+ 2
+ , or format an automatic diagnostic message using boost::
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ .0
- -33
+ -35
@@ -7590,7 +7706,7 @@
0
- -34
+ -36
@@ -7601,7 +7717,7 @@
0
- -35
+ -372
@@ -7610,7 +7726,7 @@
0
- -11
+ -132
@@ -7621,7 +7737,7 @@
0
- -35
+ -37
@@ -7632,7 +7748,7 @@
0
- -35
+ -372
@@ -7641,7 +7757,7 @@
0
- -35
+ -372
@@ -7650,7 +7766,7 @@
0
- -36
+ -382
@@ -7659,7 +7775,7 @@
0
- -7
+ -92
@@ -7668,7 +7784,7 @@
0
- -35
+ -372
@@ -7677,7 +7793,7 @@
0
- -29
+ -312
@@ -7688,7 +7804,7 @@
0
- -36
+ -38
@@ -7699,7 +7815,7 @@
0
- -36
+ -382
@@ -7708,7 +7824,7 @@
0
- -7
+ -92
@@ -7717,7 +7833,7 @@
0
- -35
+ -372
@@ -7726,7 +7842,7 @@
0
- -53
+ -542
@@ -7735,7 +7851,7 @@
0
- -36
+ -382
@@ -7744,7 +7860,7 @@
0
- -53
+ -542
@@ -7753,7 +7869,7 @@
0
- -36
+ -382
@@ -7762,7 +7878,7 @@
0
- -53
+ -542
@@ -7771,7 +7887,7 @@
0
- -36
+ -382
@@ -7780,7 +7896,7 @@
0
- -7
+ -92
@@ -7789,7 +7905,7 @@
0
- -55
+ -562
@@ -7798,7 +7914,7 @@
0
- -35
+ -372
@@ -7807,7 +7923,7 @@
0
- -7
+ -92
@@ -7816,7 +7932,7 @@
0
- -29
+ -312
@@ -7825,7 +7941,7 @@
0
- -24
+ -252
@@ -7834,7 +7950,7 @@
0
- -35
+ -372
@@ -7843,7 +7959,7 @@
0
- -35
+ -372
@@ -7852,7 +7968,7 @@
0
- -29
+ -312
@@ -7863,138 +7979,13 @@
0
- -37
-
-
-
- 11
- 2
- (:auto !!!:)
Here is how cloning can be enabled in a throw-expression (15.1):
[@#include <(:link
- 1
-
- 0
-
- -55
-
-
- 2
- :)>
#include <stdio.h>
#include <errno.h>
typedef boost::error_info<struct tag_errno,int> errno_info;
class file_read_error: public boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) { };
void
file_read( FILE * f, void * buffer, size_t size )
{
if( size!=fread(buffer,1,size,f) )
throw boost::(:link
- 1
-
- 0
-
- -17
-
-
- 2
- :)(file_read_error()) <<
errno_info(errno);
}@]
Of course, (:link
- 1
-
- 0
-
- -17
-
-
- 2
- :) may be used with any exception type; there is no requirement that it should derive from boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :).
-
-
-
-
- 0
-
- -38
+ -3912
- (: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
-
- -39
-
-
-
- 13
- 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
-
- -48
-
-
- 2
- :)>
#include <boost/shared_ptr.hpp>
#include <stdio.h>
#include <string>
#include <errno.h>
typedef boost::(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_file_name,std::string> file_name_info;
typedef boost::(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_function,char const *> function_info;
typedef boost::(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_errno,int> errno_info;
typedef boost::tuple<function_info,errno_info> clib_failure;
class file_open_error: public boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :) { };
boost::shared_ptr<FILE>
file_open( char const * name, char const * mode )
{
if( FILE * f=fopen(name,mode) )
return boost::shared_ptr<FILE>(f,fclose);
else
throw file_open_error() <<
file_name_info(name) <<
clib_failure("fopen",errno);
}@]
Note that the members of a boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) are stored separately in exception objects; they can only be retrieved individually, using (:link
- 1
-
- 0
-
- -29
-
-
- 2
- :).
+ (:auto !!:)
(:pagelist fmt="index" tags="type":)
@@ -8005,9 +7996,54 @@
- 1
+ 112
- (:auto !!:)
(:pagelist fmt="index" tags="type":)
+ (:auto !!!:)
Here is how cloning can be enabled in a throw-expression (15.1):
[@#include <(:link
+ 1
+
+ 0
+
+ -56
+
+
+ 2
+ :)>
#include <stdio.h>
#include <errno.h>
typedef boost::error_info<struct tag_errno,int> errno_info;
class file_read_error: public boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :) { };
void
file_read( FILE * f, void * buffer, size_t size )
{
if( size!=fread(buffer,1,size,f) )
throw boost::(:link
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ :)(file_read_error()) <<
errno_info(errno);
}@]
Of course, (:link
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ :) may be used with any exception type; there is no requirement that it should derive from boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :).
@@ -8025,7 +8061,7 @@
0
- -35
+ -372
@@ -8034,7 +8070,7 @@
0
- -49
+ -502
@@ -8043,7 +8079,7 @@
0
- -36
+ -382
@@ -8052,7 +8088,7 @@
0
- -35
+ -372
@@ -8061,7 +8097,7 @@
0
- -49
+ -502
@@ -8070,7 +8106,7 @@
0
- -36
+ -382
@@ -8079,7 +8115,7 @@
0
- -35
+ -372
@@ -8088,7 +8124,7 @@
0
- -35
+ -372
@@ -8097,7 +8133,7 @@
0
- -35
+ -372
@@ -8125,81 +8161,18 @@
- 17
+ 32
- (:auto !!!:)
The following example demonstrates how errno can be stored in exception objects using Boost Exception:
[@#include <(:link
+ !!!!Example:
this is a possible output from the (:link 10
- -49
+ -212
- :)>
#include <errno.h>
#include <iostream>
typedef boost::(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)<struct tag_errno,int> errno_info; //(1)
class my_error: public boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :), public std::exception { }; //(2)
void
f()
{
throw my_error() << errno_info(errno); //(3)
}
@]
First, we instantiate the (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :) template using a unique identifier -- tag_errno, and the type of the info it identifies -- int. This provides compile-time type safety for the various values stored in exception objects.
Second, we define class my_error, which derives from boost::(:link
- 1
-
- 0
-
- -35
-
-
- 2
- :).
Finally, (3) illustrates how the typedef from (1) can be used with (:link
- 1
-
- 0
-
- -7
-
-
- 2
- |operator<<:) to store values in exception objects at the point of the throw.
The stored errno value can be recovered at a later time like this:
[@// ...continued
void
g()
{
try
{
f();
}
catch(
my_error & x )
{
if( int const * err=boost::(:link
- 1
-
- 0
-
- -29
-
-
- 2
- :)<errno_info>(x) )
std::cerr << "Error code: " << *err;
}
}@]
The (:link
- 1
-
- 0
-
- -29
-
-
- 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.
+ :) function, as used in ''libs/exception/example/example_io.cpp:''
[@example_io.cpp(83): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *)
Dynamic exception type: class boost::exception_detail::clone_impl<class fopen_error>
std::exception::what: example_io error
[struct tag_errno *] = 2, OS says "No such file or directory"
[struct tag_file_name *] = tmp1.txt
[struct tag_function *] = fopen
[struct tag_open_mode *] = rb@]
@@ -8210,36 +8183,81 @@
- 7
+ 172
- (:auto !!!:)
(:include decl:)
!!!!Effects:
* Default constructor: initializes an empty boost::(:link
+ (:auto !!!:)
The following example demonstrates how errno can be stored in exception objects using Boost Exception:
[@#include <(:link 10
- -35
+ -502
- :) object.
* Copy constructor: initializes a boost::(:link
+ :)>
#include <errno.h>
#include <iostream>
typedef boost::(:link 10
- -35
+ -382
- :) object which shares ownership with x of all data added through (:link
+ :)<struct tag_errno,int> errno_info; //(1)
class my_error: public boost::(:link 10
- -7
+ -372
- mod="/":), including data that is added at a future time.
!!!!Throws:
Nothing.
+ :), public std::exception { }; //(2)
void
f()
{
throw my_error() << errno_info(errno); //(3)
}
@]
First, we instantiate the (:link
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :) template using a unique identifier -- tag_errno, and the type of the info it identifies -- int. This provides compile-time type safety for the various values stored in exception objects.
Second, we define class my_error, which derives from boost::(:link
+ 1
+
+ 0
+
+ -37
+
+
+ 2
+ :).
Finally, (3) illustrates how the typedef from (1) can be used with (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ |operator<<:) to store values in exception objects at the point of the throw.
The stored errno value can be recovered at a later time like this:
[@// ...continued
void
g()
{
try
{
f();
}
catch(
my_error & x )
{
if( int const * err=boost::(:link
+ 1
+
+ 0
+
+ -31
+
+
+ 2
+ :)<errno_info>(x) )
std::cerr << "Error code: " << *err;
}
}@]
The (:link
+ 1
+
+ 0
+
+ -31
+
+
+ 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.
@@ -8250,27 +8268,36 @@
- 5
+ 72
- (:auto !!!:)
(:include synopsis:)
!!!!Description:
Returns a const reference to the copy of the value passed to (:link
+ (:auto !!!:)
(:include decl:)
!!!!Effects:
* Default constructor: initializes an empty boost::(:link 10
- -36
+ -372
- :)'s constructor stored in the (:link
+ :) object.
* Copy constructor: initializes a boost::(:link 10
- -36
+ -372
- :) object.
!!!!Throws:
Nothing.
+ :) object which shares ownership with x of all data added through (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ mod="/":), including data that is added at a future time.
!!!!Throws:
Nothing.
@@ -8281,207 +8308,27 @@
- 45
+ 52
- !!Synopsis
List of documented definitions, declarations and includes by header file:
`#include <(:link
+ (:auto !!!:)
(:include synopsis:)
!!!!Description:
Returns a const reference to the copy of the value passed to (:link 10
- -23
+ -382
- :)>
[@(:include
+ :)'s constructor stored in the (:link 10
- -23
+ -382
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -53
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -53
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -55
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -55
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -48
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -48
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -51
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -51
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -42
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -42
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -59
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -59
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -56
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -56
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -26
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -26
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -57
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -57
-
-
- 2
- synopsis:)@]
`#include <(:link
- 1
-
- 0
-
- -49
-
-
- 2
- :)>
(:include
- 1
-
- 0
-
- -49
-
-
- 2
- synopsis:)
+ :) object.
!!!!Throws:
Nothing.
@@ -8492,9 +8339,207 @@
- 1
+ 452
- (:auto !!:)
(:pagelist fmt="index" tags="function":)
+ !!Synopsis
List of documented definitions, declarations and includes by header file:
`#include <(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -54
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -54
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -56
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -56
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -49
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -49
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -52
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -52
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -42
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -42
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -60
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -60
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -57
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -57
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -58
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -58
+
+
+ 2
+ synopsis:)@]
`#include <(:link
+ 1
+
+ 0
+
+ -50
+
+
+ 2
+ :)>
(:include
+ 1
+
+ 0
+
+ -50
+
+
+ 2
+ synopsis:)
@@ -8507,7 +8552,7 @@
12
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
+ (:auto !!:)
(:pagelist fmt="index" tags="function":)
@@ -8531,27 +8576,9 @@
- 5
+ 12
- (:auto !!!:)
(:include synopsis:)
!!!!Definition:
The expression
- 1
-
- 0
-
- -36
-
-
- 2
- <Tag,T>::(:link
- 1
-
- 0
-
- -50
-
-
- 2
- mod="m":) evaluates to T.
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
@@ -8562,9 +8589,27 @@
- 1
+ 52
- (:auto !!!:)
!!!Synopsis
(:include synopsis:)
+ (:auto !!!:)
(:include synopsis:)
!!!!Definition:
The expression
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ <Tag,T>::(:link
+ 1
+
+ 0
+
+ -51
+
+
+ 2
+ mod="m":) evaluates to T.
@@ -8577,7 +8622,7 @@
12
- (:auto !!:)
(:pagelist fmt="index" tags="hpp" sort_prefix="6":)
+ (:auto !!!:)
!!!Synopsis
(:include synopsis:)
@@ -8590,7 +8635,7 @@
12
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
+ (:auto !!:)
(:pagelist fmt="index" tags="hpp" sort_prefix="6":)
@@ -8603,7 +8648,7 @@
12
- (:auto !!:)
(:pagelist tags="macro":)
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
@@ -8616,7 +8661,7 @@
12
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
+ (:auto !!:)
(:pagelist tags="macro":)
@@ -8655,7 +8700,7 @@
12
- (:auto !:)
This is an alphabetical list of all Boost Exception documentation pages.
(:pagelist fmt="index" except_tags="index noindex" mod="w":)
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
@@ -8668,7 +8713,7 @@
12
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
+ (:auto !:)
This is an alphabetical list of all Boost Exception documentation pages.
(:pagelist fmt="index" except_tags="index noindex" mod="w":)
@@ -8679,18 +8724,9 @@
- 3
+ 12
- !!!!Example:
this is a possible output from the (:link
- 1
-
- 0
-
- -21
-
-
- 2
- :) function, as used in ''libs/exception/example/example_io.cpp:''
[@example_io.cpp(83): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *)
Dynamic exception type: class boost::exception_detail::clone_impl<class fopen_error>
std::exception::what: example_io error
[struct tag_errno *] = 2, OS says "No such file or directory"
[struct tag_file_name *] = tmp1.txt
[struct tag_function *] = fopen
[struct tag_open_mode *] = rb@]
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
@@ -8726,9 +8762,7 @@
- 1
- 2
- !!!!Throws:
Any exception emitted by v's copy constructor.
+ 0
@@ -8741,7 +8775,7 @@
12
- !!!!Throws:
std::bad_alloc, or any exception emitted by the T copy constructor.
+ !!!!Throws:
Any exception emitted by v's copy constructor.
@@ -8763,7 +8797,9 @@
- 0
+ 1
+ 2
+ !!!!Throws:
std::bad_alloc, or any exception emitted by the T copy constructor.
@@ -8774,7 +8810,9 @@
- 0
+ 1
+ 2
+ !!!!Throws:
std::bad_alloc, or any exception emitted by T1..TN copy constructor.
@@ -8829,9 +8867,7 @@
- 1
- 2
- !!!!Throws:
std::bad_alloc, or any exception emitted by T1..TN copy constructor.
+ 0
@@ -9351,7 +9387,18 @@
- 0
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -57
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -9362,18 +9409,7 @@
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -55
-
-
- 2
- :)>
[@(:include decl:)@]
+ 0
@@ -9391,11 +9427,11 @@
0
- -55
+ -562
- :)>\\
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ :)>
[@(:include decl:)@]
@@ -9406,18 +9442,7 @@
- 3
- 2
- `#include <
- 1
-
- 0
-
- -51
-
-
- 2
- >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ 0
@@ -9439,7 +9464,7 @@
2
- :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ :)>\\
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -9450,7 +9475,27 @@
- 0
+ 5
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -49
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include
+ 1
+
+ 0
+
+ -10
+
+
+ 2
+ decl pre_indent="4":)
}@]
@@ -9461,7 +9506,18 @@
- 0
+ 3
+ 2
+ `#include <
+ 1
+
+ 0
+
+ -52
+
+
+ 2
+ >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -9472,7 +9528,18 @@
- 0
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -57
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -9494,18 +9561,7 @@
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -56
-
-
- 2
- :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ 0
@@ -9516,27 +9572,7 @@
- 5
- 2
- `#include <(:link
- 1
-
- 0
-
- -48
-
-
- 2
- :)>
[@namespace
boost
{
(:include
- 1
-
- 0
-
- -15
-
-
- 2
- decl pre_indent="4":)
}@]
+ 0
@@ -9558,18 +9594,7 @@
- 3
- 2
- `#include <
- 1
-
- 0
-
- -26
-
-
- 2
- >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ 0
@@ -9587,11 +9612,11 @@
0
- -57
+ -272
- >
(:include decl:)
+ >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -9602,7 +9627,18 @@
- 0
+ 3
+ 2
+ `#include <
+ 1
+
+ 0
+
+ -58
+
+
+ 2
+ >
(:include decl:)
@@ -9646,18 +9682,7 @@
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -56
-
-
- 2
- :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ 0
@@ -9668,9 +9693,18 @@
- 1
+ 32
- [@namespace
boost
{
(:include api pre_indent="4":)
}@]
+ `#include <(:link
+ 1
+
+ 0
+
+ -57
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -9683,7 +9717,7 @@
12
- [@#include <boost/shared_ptr.hpp>
namespace
boost
{
(:include api pre_indent="4":)
}@]
+ [@namespace
boost
{
(:include api pre_indent="4":)
}@]
@@ -9694,7 +9728,9 @@
- 0
+ 1
+ 2
+ [@#include <boost/shared_ptr.hpp>
namespace
boost
{
(:include api pre_indent="4":)
}@]
@@ -9705,18 +9741,7 @@
- 3
- 2
- [@#include <
- 1
-
- 0
-
- -23
-
-
- 2
- >
namespace
boost
{
(:include api pre_indent="4":)
}@]
+ 0
@@ -9729,16 +9754,16 @@
32
- `#include <(:link
+ [@#include <10
- -42
+ -242
- :)>\\
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ >
namespace
boost
{
(:include api pre_indent="4":)
}@]
@@ -9756,11 +9781,11 @@
0
- -56
+ -422
- :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ :)>\\
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -9783,28 +9808,6 @@
-30
-
- 0
-
-
-
-
- 0
-
- -31
-
-
-
- 0
-
-
-
-
- 0
-
- -32
-
- 32
@@ -9817,7 +9820,31 @@
2
- :)>
[@namespace
boost
{
(:include decl:)
}@]
+ :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 1
+ 2
+ [@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+
+
+
+
+ 0
+
+ -32
+
+
+
+ 0
@@ -9828,18 +9855,7 @@
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -56
-
-
- 2
- :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ 0
@@ -9850,7 +9866,18 @@
- 0
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -58
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include decl:)
}@]
@@ -9868,11 +9895,11 @@
0
- -23
+ -572
- :)>
[@namespace
boost
{
(:include def pre_indent="4":)
}@]
+ :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -9883,18 +9910,7 @@
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -55
-
-
- 2
- :)>
[@namespace
boost
{
(:include def pre_indent="4":)
}@]
+ 0
@@ -9905,7 +9921,18 @@
- 0
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include def pre_indent="4":)
}@]
@@ -9916,9 +9943,18 @@
- 1
+ 32
- [@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ `#include <(:link
+ 1
+
+ 0
+
+ -56
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include def pre_indent="4":)
}@]
@@ -9969,7 +10005,7 @@
0
- -35
+ -372
@@ -10006,18 +10042,7 @@
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -55
-
-
- 2
- :)>
[@(:include decl:)@]
+ 0
@@ -10028,7 +10053,18 @@
- 0
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -56
+
+
+ 2
+ :)>
[@(:include decl:)@]
@@ -10049,6 +10085,17 @@
-48
+
+ 0
+
+
+
+
+ 0
+
+ -49
+
+ 32
@@ -10057,7 +10104,7 @@
0
- -55
+ -562
@@ -10068,7 +10115,7 @@
0
- -49
+ -50
@@ -10081,7 +10128,7 @@
0
- -50
+ -51
@@ -10092,7 +10139,7 @@
0
- -55
+ -562
@@ -10103,7 +10150,7 @@
0
- -51
+ -52
@@ -10114,7 +10161,7 @@
0
- -23
+ -242
@@ -10125,7 +10172,7 @@
0
- -52
+ -53
@@ -10136,7 +10183,7 @@
0
- -53
+ -54
@@ -10145,17 +10192,6 @@
[@namespace
boost
{
(:include api pre_indent="4":)
}@]
-
-
- 0
-
- -54
-
-
-
- 0
-
- 0
@@ -10164,18 +10200,7 @@
- 3
- 2
- [@#include <(:link
- 1
-
- 0
-
- -23
-
-
- 2
- :)>
namespace
boost
{
(:include api pre_indent="4":)
}@]
+ 0
@@ -10193,7 +10218,7 @@
0
- -23
+ -242
@@ -10208,9 +10233,18 @@
- 1
+ 32
- (:include api:)
+ [@#include <(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :)>
namespace
boost
{
(:include api pre_indent="4":)
}@]
@@ -10221,7 +10255,9 @@
- 0
+ 1
+ 2
+ (:include api:)
@@ -10232,9 +10268,7 @@
- 1
- 2
- [@namespace
boost
{
(:include api pre_indent="4":)
}@]
+ 0
@@ -10245,7 +10279,9 @@
- 0
+ 1
+ 2
+ [@namespace
boost
{
(:include api pre_indent="4":)
}@]
@@ -10453,7 +10489,7 @@
- -30
+ -32
@@ -10470,7 +10506,7 @@
- -31
+ -33
@@ -10487,7 +10523,7 @@
- -5
+ -6
@@ -10504,126 +10540,7 @@
- -58
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
- -51
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
- -26
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
- -19
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
- -34
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
- -11
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
- -10
-
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
- -47
+ -59
@@ -10657,7 +10574,7 @@
- -40
+ -27
@@ -10674,7 +10591,7 @@
- -54
+ -16
@@ -10691,7 +10608,126 @@
- -46
+ -36
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+ -13
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+ -8
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+ -48
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+ -53
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+ -39
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+ -55
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+ -47
@@ -10715,7 +10751,7 @@
- -13
+ -15
@@ -10739,7 +10775,7 @@
- -60
+ -43
@@ -10763,7 +10799,7 @@
- -12
+ -14
@@ -10791,7 +10827,7 @@
- -38
+ -29
@@ -10819,7 +10855,7 @@
- -28
+ -30
@@ -10847,7 +10883,7 @@
- -22
+ -23
@@ -10875,7 +10911,7 @@
- -9
+ -12
@@ -10903,7 +10939,7 @@
- -33
+ -35
@@ -10931,7 +10967,7 @@
- -14
+ -5
@@ -10959,7 +10995,7 @@
- -29
+ -31
@@ -11007,7 +11043,7 @@
- -49
+ -50
@@ -11035,7 +11071,7 @@
- -6
+ -7
@@ -11063,7 +11099,7 @@
- -7
+ -9
@@ -11087,7 +11123,7 @@
- -43
+ -44
@@ -11111,7 +11147,7 @@
- -57
+ -58
@@ -11135,7 +11171,7 @@
- -55
+ -56
@@ -11163,7 +11199,7 @@
- -32
+ -34
@@ -11195,7 +11231,7 @@
- -16
+ -17
@@ -11219,7 +11255,7 @@
- -59
+ -60
@@ -11247,7 +11283,7 @@
- -36
+ -38
@@ -11279,7 +11315,7 @@
- -50
+ -51
@@ -11311,7 +11347,7 @@
- -45
+ -46
@@ -11335,7 +11371,7 @@
- -24
+ -25
@@ -11391,7 +11427,7 @@
- -27
+ -28
@@ -11415,7 +11451,7 @@
- -56
+ -57
@@ -11439,7 +11475,7 @@
- -23
+ -24
@@ -11467,7 +11503,7 @@
- -25
+ -26
@@ -11495,7 +11531,7 @@
- -17
+ -18
@@ -11523,7 +11559,7 @@
- -8
+ -11
@@ -11551,7 +11587,7 @@
- -35
+ -37
@@ -11583,7 +11619,7 @@
- -44
+ -45
@@ -11607,7 +11643,7 @@
- -48
+ -49
@@ -11631,7 +11667,7 @@
- -37
+ -40
@@ -11655,7 +11691,7 @@
- -18
+ -19
@@ -11731,7 +11767,7 @@
- -53
+ -54
@@ -11759,7 +11795,7 @@
- -15
+ -10
@@ -11783,7 +11819,7 @@
- -39
+ -22
@@ -11814,7 +11850,7 @@
-5
- tutorial
+ exception_ptr free function
@@ -11823,7 +11859,7 @@
-6
- function member
+ tutorial
@@ -11832,16 +11868,7 @@
-7
- error_info free function
-
-
-
- 0
-
- -8
-
-
- error_info free function
+ function member
@@ -11850,40 +11877,13 @@
-9
- type
+ error_info free function0
- -12
-
-
- tutorial
-
-
-
- 0
-
- -13
-
-
- noindex tutorial
-
-
-
- 0
-
- -14
-
-
- exception_ptr free function
-
-
-
- 0
-
- -15
+ -10error_info free function
@@ -11892,7 +11892,43 @@
0
- -17
+ -11
+
+
+ error_info free function
+
+
+
+ 0
+
+ -12
+
+
+ type
+
+
+
+ 0
+
+ -14
+
+
+ tutorial
+
+
+
+ 0
+
+ -15
+
+
+ noindex tutorial
+
+
+
+ 0
+
+ -18exception_ptr free function
@@ -11901,7 +11937,7 @@
0
- -18
+ -19macro
@@ -11931,7 +11967,7 @@
-22
- exception_ptr free function
+ noalso noindex tutorial
@@ -11940,7 +11976,7 @@
-23
-
+ exception_ptr free function
@@ -11949,7 +11985,7 @@
-24
- error_info
+
@@ -11958,7 +11994,7 @@
-25
- function
+ error_info
@@ -11967,7 +12003,7 @@
-26
- exception_ptr
+ function
@@ -11976,7 +12012,7 @@
-27
- function
+ exception_ptr
@@ -11985,7 +12021,7 @@
-28
- exception_ptr type
+ function
@@ -11994,7 +12030,7 @@
-29
- error_info free function
+ function
@@ -12003,7 +12039,7 @@
-30
- noindex
+ exception_ptr type
@@ -12012,7 +12048,7 @@
-31
- tutorial
+ error_info free function
@@ -12021,7 +12057,7 @@
-32
- free function
+ noindex
@@ -12030,7 +12066,7 @@
-33
- exception_ptr free function
+ tutorial
@@ -12039,7 +12075,7 @@
-34
- tutorial
+ free function
@@ -12048,7 +12084,7 @@
-35
- type
+ exception_ptr free function
@@ -12057,7 +12093,7 @@
-36
- type
+ tutorial
@@ -12066,7 +12102,7 @@
-37
- noindex tutorial
+ type
@@ -12075,16 +12111,16 @@
-38
- function
+ type0
- -39
+ -40
- noalso noindex tutorial
+ noindex tutorial
@@ -12108,7 +12144,7 @@
0
- -43
+ -44noalso noindex tutorial
@@ -12117,7 +12153,7 @@
0
- -44
+ -45function
@@ -12126,20 +12162,11 @@
0
- -45
+ -46function member
-
-
- 0
-
- -48
-
-
-
- 0
@@ -12156,7 +12183,7 @@
-50
- type
+
@@ -12165,22 +12192,22 @@
-51
+ type
+
+
+
+ 0
+
+ -52
+
+ error_info0
- -53
-
-
-
-
-
-
- 0
-
- -55
+ -54
@@ -12221,6 +12248,15 @@
+
+
+ 0
+
+ -60
+
+
+
+
diff --git a/doc/throw_exception.html b/doc/throw_exception.html
index cf4ef4b..475af83 100644
--- a/doc/throw_exception.html
+++ b/doc/throw_exception.html
@@ -38,6 +38,8 @@ boost
If BOOST_NO_EXCEPTIONS is not defined, boost::throw_exception(e) is equivalent to throw boost::enable_current_exception(boost::enable_error_info(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::throw_exception(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 throw_exception are allowed to assume that the function never returns; therefore, if the user-defined throw_exception 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::get_error_info, or format an automatic diagnostic message using boost::diagnostic_information.