From 29fc99b37814897f09eab00002096e1b450d124e Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Fri, 5 Sep 2008 18:24:54 +0000 Subject: [PATCH] documentation update [SVN r48619] --- doc/boost-exception.html | 28 +- doc/diagnostic_information.html | 4 +- doc/enable_current_exception.html | 4 +- doc/enable_error_info.html | 4 +- doc/exception.html | 2 +- ...exception_diagnostic_information_hpp.html} | 0 ...xception_enable_current_exception_hpp.html | 56 + doc/exception_enable_error_info_hpp.html | 56 + doc/exception_exception_hpp.html | 12 +- ...html => exception_get_error_info_hpp.html} | 0 doc/exception_hpp.html | 4 +- doc/get_error_info.html | 4 +- doc/name_idx.html | 6 +- doc/source/boost-exception.reno | 9790 ++++++++--------- 14 files changed, 5040 insertions(+), 4930 deletions(-) rename doc/{boost_exception_diagnostic_information_hpp.html => exception_diagnostic_information_hpp.html} (100%) create mode 100644 doc/exception_enable_current_exception_hpp.html create mode 100644 doc/exception_enable_error_info_hpp.html rename doc/{boost_exception_get_error_info_hpp.html => exception_get_error_info_hpp.html} (100%) diff --git a/doc/boost-exception.html b/doc/boost-exception.html index 5a39d5a..72355a5 100644 --- a/doc/boost-exception.html +++ b/doc/boost-exception.html @@ -51,10 +51,12 @@
  • throw_exception, BOOST_THROW_EXCEPTION
  • Configuration
  • Headers
    1. boost/exception.hpp
    2. -
    3. boost/exception/diagnostic_information.hpp
    4. +
    5. boost/exception/diagnostic_information.hpp
    6. +
    7. boost/exception/enable_current_exception.hpp
    8. +
    9. boost/exception/enable_error_info.hpp
    10. boost/exception/error_info.hpp
    11. boost/exception/exception.hpp
    12. -
    13. boost/exception/get_error_info.hpp
    14. +
    15. boost/exception/get_error_info.hpp
    16. boost/exception/info.hpp
    17. boost/exception/info_tuple.hpp
    18. boost/exception_ptr.hpp
    19. @@ -85,13 +87,7 @@ boost typedef error_info<struct tag_throw_function,char const *> throw_function; typedef error_info<struct tag_throw_file,char const *> throw_file; - typedef error_info<struct tag_throw_line,int> throw_line; - - template <class T> - ---unspecified--- enable_error_info( T const & x ); - - template <class T> - ---unspecified--- enable_current_exception( T const & e ); + typedef error_info<struct tag_throw_line,int> throw_line; template <class Tag,class T> class @@ -114,6 +110,9 @@ boost ..., error_info<TagN,TN> > const & v ); + template <class T> + ---unspecified--- enable_error_info( T const & x ); + class exception; std::string diagnostic_information( boost::exception const & x ); @@ -133,6 +132,9 @@ boost exception_ptr current_exception(); void rethrow_exception( exception_ptr const & ep ); + + template <class T> + ---unspecified--- enable_current_exception( T const & e ); }

      #include <boost/throw_exception.hpp>

      #if !defined( BOOST_NO_EXCEPTIONS ) && !defined( BOOST_EXCEPTION_DISABLE )
      @@ -245,7 +247,7 @@ boost
       

      std::bad_alloc, or any exception emitted by T1..TN copy constructor.

    get_error_info

    -

    #include <boost/exception/get_error_info.hpp>

    +

    #include <boost/exception/get_error_info.hpp>

    namespace
     boost
         {
    @@ -267,7 +269,7 @@ boost
     

    The interface of get_error_info may be affected by the build Configuration.

    enable_error_info

    -

    #include <boost/exception/exception.hpp>

    +

    #include <boost/exception/enable_error_info.hpp>

    namespace
     boost
         {
    @@ -301,7 +303,7 @@ boost
     

    enable_current_exception

    -

    #include <boost/exception/exception.hpp>

    +

    #include <boost/exception/enable_current_exception.hpp>

    namespace
     boost
         {
    @@ -394,7 +396,7 @@ boost
     

    Printing Diagnostic Information

    diagnostic_information

    -

    #include <boost/exception/diagnostic_information.hpp> 

    +

    #include <boost/exception/diagnostic_information.hpp> 

    namespace
     boost
         {
    diff --git a/doc/diagnostic_information.html b/doc/diagnostic_information.html
    index 767e50c..d775718 100644
    --- a/doc/diagnostic_information.html
    +++ b/doc/diagnostic_information.html
    @@ -21,7 +21,7 @@
     
     

    diagnostic_information

    -

    #include <boost/exception/diagnostic_information.hpp> 

    + diff --git a/doc/enable_current_exception.html b/doc/enable_current_exception.html index decb0ff..328365c 100644 --- a/doc/enable_current_exception.html +++ b/doc/enable_current_exception.html @@ -21,7 +21,7 @@

    enable_current_exception

    -

    #include <boost/exception/exception.hpp>

    +

    #include <boost/exception/enable_current_exception.hpp>

    namespace
     boost
         {
    @@ -48,7 +48,7 @@ throw boost::enab
     

    See Also:

    Boost Exception
    -
    boost/exception/exception.hpp
    +
    boost/exception/enable_current_exception.hpp
    Configuration
    copy_exception
    current_exception
    diff --git a/doc/enable_error_info.html b/doc/enable_error_info.html index 2d36e79..b0632a3 100644 --- a/doc/enable_error_info.html +++ b/doc/enable_error_info.html @@ -21,7 +21,7 @@

    enable_error_info

    -

    #include <boost/exception/exception.hpp>

    +

    #include <boost/exception/enable_error_info.hpp>

    namespace
     boost
         {
    @@ -40,7 +40,7 @@ boost
     

    See Also:


    See Also:

    Boost Exception
    -
    boost/exception/diagnostic_information.hpp
    +
    boost/exception/diagnostic_information.hpp
    boost/exception/exception.hpp
    Configuration
    current_exception
    diff --git a/doc/boost_exception_diagnostic_information_hpp.html b/doc/exception_diagnostic_information_hpp.html similarity index 100% rename from doc/boost_exception_diagnostic_information_hpp.html rename to doc/exception_diagnostic_information_hpp.html diff --git a/doc/exception_enable_current_exception_hpp.html b/doc/exception_enable_current_exception_hpp.html new file mode 100644 index 0000000..fb08116 --- /dev/null +++ b/doc/exception_enable_current_exception_hpp.html @@ -0,0 +1,56 @@ + + + + + boost/exception/enable_current_exception.hpp + + + +
    +
    +
    +
    + +

    Boost Exception

    +
    + + + +

    boost/exception/enable_current_exception.hpp

    +
    +

    Synopsis

    +
    #include <boost/exception/exception.hpp>
    +
    +namespace
    +boost
    +    {
    +    template <class T>
    +    ---unspecified--- enable_current_exception( T const & e );
    +    }
    +
    + + + + +
    +
    +
    + + diff --git a/doc/exception_enable_error_info_hpp.html b/doc/exception_enable_error_info_hpp.html new file mode 100644 index 0000000..2c28c7f --- /dev/null +++ b/doc/exception_enable_error_info_hpp.html @@ -0,0 +1,56 @@ + + + + + boost/exception/enable_error_info.hpp + + + +
    +
    +
    +
    + +

    Boost Exception

    +
    + + + +

    boost/exception/enable_error_info.hpp

    +
    +

    Synopsis

    +
    #include <boost/exception/exception.hpp>
    +
    +namespace
    +boost
    +    {
    +    template <class T>
    +    ---unspecified--- enable_error_info( T const & x );
    +    }
    +
    + + + + +
    +
    +
    + + diff --git a/doc/exception_exception_hpp.html b/doc/exception_exception_hpp.html index c146f3d..990e276 100644 --- a/doc/exception_exception_hpp.html +++ b/doc/exception_exception_hpp.html @@ -40,23 +40,17 @@ boost typedef error_info<struct tag_throw_function,char const *> throw_function; typedef error_info<struct tag_throw_file,char const *> throw_file; - typedef error_info<struct tag_throw_line,int> throw_line; - - template <class T> - ---unspecified--- enable_error_info( T const & x ); - - template <class T> - ---unspecified--- enable_current_exception( T const & e ); + typedef error_info<struct tag_throw_line,int> throw_line; }
    diff --git a/doc/boost_exception_get_error_info_hpp.html b/doc/exception_get_error_info_hpp.html similarity index 100% rename from doc/boost_exception_get_error_info_hpp.html rename to doc/exception_get_error_info_hpp.html diff --git a/doc/exception_hpp.html b/doc/exception_hpp.html index 7bebc63..cb65490 100644 --- a/doc/exception_hpp.html +++ b/doc/exception_hpp.html @@ -22,10 +22,10 @@

    boost/exception.hpp

    Synopsis

    -
    #include <boost/exception/diagnostic_information.hpp>
    +
    #include <boost/exception/diagnostic_information.hpp>
     #include <boost/exception/error_info.hpp>
     #include <boost/exception/exception.hpp>
    -#include <boost/exception/get_error_info.hpp>
    +#include <boost/exception/get_error_info.hpp>
     #include <boost/exception/info.hpp>
     #include <boost/exception/info_tuple.hpp>
     #include <boost/exception_ptr.hpp>
    diff --git a/doc/get_error_info.html b/doc/get_error_info.html index d59ef7a..34b511e 100644 --- a/doc/get_error_info.html +++ b/doc/get_error_info.html @@ -21,7 +21,7 @@

    get_error_info

    -

    #include <boost/exception/get_error_info.hpp>

    +

    #include <boost/exception/get_error_info.hpp>

    namespace
     boost
         {
    @@ -45,7 +45,7 @@ boost
     

    See Also:

    BOOST_THROW_EXCEPTION
    Boost Exception
    -
    boost/exception/get_error_info.hpp
    +
    boost/exception/get_error_info.hpp
    Configuration
    error_info
    exception
    diff --git a/doc/name_idx.html b/doc/name_idx.html index 3a3554f..9a0514b 100644 --- a/doc/name_idx.html +++ b/doc/name_idx.html @@ -26,10 +26,12 @@

    Boost Exception

    b

    boost/exception.hpp

    -

    boost/exception/diagnostic_information.hpp

    +

    boost/exception/diagnostic_information.hpp

    +

    boost/exception/enable_current_exception.hpp

    +

    boost/exception/enable_error_info.hpp

    boost/exception/error_info.hpp

    boost/exception/exception.hpp

    -

    boost/exception/get_error_info.hpp

    +

    boost/exception/get_error_info.hpp

    boost/exception/info.hpp

    boost/exception/info_tuple.hpp

    boost/exception_ptr.hpp

    diff --git a/doc/source/boost-exception.reno b/doc/source/boost-exception.reno index 11a7e29..e415038 100644 --- a/doc/source/boost-exception.reno +++ b/doc/source/boost-exception.reno @@ -48,338 +48,6 @@ reno_context - - - - - - 2 - 612485E090D76B2CC43C1A296F813075BA165C2496082E78E939F10B3DA8E09A - 1770110914 - 587 - 1566 - 60F3F48B87487FA6E0D2CCC0750AF435CC92CEC80BBBF609AC71295031AADD0D - 3929437933 - 361 - 213 - - - - - - 0 - ../../../../boost/throw_exception.hpp - 0 - 0 - - - - - <string>throw_exception</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 6 - - reno_context - - - - - - - 0 - - - - - - 1 - - - - - <string>boost/exception/enable_current_exception.hpp</string> - - - exception_enable_current_exception_hpp - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 7 - - reno_context - - - - - - - 2 - 50E48ABD58B427E16B2EFA345D5FE67159057CB90F19AA1AD52C11991FD8500E - 4076172629 - 8577 - 323 - B4D37C317A3B45825DDA1A8C8B1CE71CC2E530D15090D05995FCBEC4247F49C4 - 2742768198 - 258 - 6714 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - - <string>enable_error_info</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 8 - - reno_context - - - - - - - 2 - 17F10DBB69A481226D23CBBD7A897BF484EB8C5B1DC2E346E725EF0B8CE76D14 - 469421394 - 3808 - 518 - D31BCE814DF5B8B718E7EB67A194AD08EF716A26D422E436596ABA1F145007D8 - 4055211476 - 525 - 3277 - - - - - - 0 - ../../../../boost/exception/info.hpp - 0 - 0 - - - - - <string>operator<</exception</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 9 - - reno_context - - - - - - - 2 - 86E1196533E771AEFD141DA43FCD980AE3D7689A45EDD54A2DF28B1943E0E7DB - 941210061 - 8706 - 487 - 0066D4E6E6B189906E6DE04F08509F3737511701A1B1355B37511EC18E8371F4 - 2078296250 - 305 - 8138 - - - - - - 0 - ../../../../boost/exception_ptr.hpp - 0 - 0 - - - - - <string>copy_exception</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 10 - - reno_context - - - - - - - 2 - 50E48ABD58B427E16B2EFA345D5FE67159057CB90F19AA1AD52C11991FD8500E - 4076172629 - 8577 - 323 - 2D32D2DE11DB8BDD6F34C94CC165ABEF4F4CCB2D119354FA05811534E2AF356F - 1002290201 - 1604 - 3720 - - - - - - 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 - - 11 - - reno_context - - - - - - - 2 - 86E1196533E771AEFD141DA43FCD980AE3D7689A45EDD54A2DF28B1943E0E7DB - 941210061 - 8706 - 487 - E23085202D084CBB50F289988A6A592F06D923B77D0AB25D7A98A7188DF5BE3B - 1414247481 - 766 - 7370 - - - - - - 0 - ../../../../boost/exception_ptr.hpp - 0 - 0 - - - - - <string>current_exception</string> - - - - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - 12 - - reno_context - @@ -412,7 +80,7 @@ 0 - 13 + 6 reno_context @@ -446,7 +114,43 @@ 0 - -5 + 7 + + reno_context + + + + + + + 2 + 612485E090D76B2CC43C1A296F813075BA165C2496082E78E939F10B3DA8E09A + 1770110914 + 587 + 1566 + 60F3F48B87487FA6E0D2CCC0750AF435CC92CEC80BBBF609AC71295031AADD0D + 3929437933 + 361 + 213 + + + + + + 0 + ../../../../boost/throw_exception.hpp + 0 + 0 + + + + + <string>throw_exception</string> + + + + + 2 @@ -455,7 +159,7 @@ 0 - 14 + 8 reno_context @@ -489,7 +193,7 @@ 0 - 15 + 9 reno_context @@ -530,7 +234,7 @@ 0 - -13 + -6 2 @@ -539,7 +243,7 @@ 0 - 16 + 10 reno_context @@ -580,7 +284,43 @@ 0 - -10 + 11 + + reno_context + + + + + + + 2 + 50E48ABD58B427E16B2EFA345D5FE67159057CB90F19AA1AD52C11991FD8500E + 4076172629 + 8577 + 323 + 2D32D2DE11DB8BDD6F34C94CC165ABEF4F4CCB2D119354FA05811534E2AF356F + 1002290201 + 1604 + 3720 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + + <string>exception</string> + + + + + 2 @@ -589,7 +329,7 @@ 0 - 17 + 12 reno_context @@ -634,7 +374,43 @@ 0 - -8 + 13 + + reno_context + + + + + + + 2 + 17F10DBB69A481226D23CBBD7A897BF484EB8C5B1DC2E346E725EF0B8CE76D14 + 469421394 + 3808 + 518 + D31BCE814DF5B8B718E7EB67A194AD08EF716A26D422E436596ABA1F145007D8 + 4055211476 + 525 + 3277 + + + + + + 0 + ../../../../boost/exception/info.hpp + 0 + 0 + + + + + <string>operator<</exception</string> + + + + + 2 @@ -643,7 +419,7 @@ 0 - 18 + 14 reno_context @@ -688,7 +464,7 @@ 0 - 19 + 15 reno_context @@ -733,7 +509,43 @@ 0 - -7 + 16 + + reno_context + + + + + + + 2 + 50E48ABD58B427E16B2EFA345D5FE67159057CB90F19AA1AD52C11991FD8500E + 4076172629 + 8577 + 323 + B4D37C317A3B45825DDA1A8C8B1CE71CC2E530D15090D05995FCBEC4247F49C4 + 2742768198 + 258 + 6714 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + + <string>enable_error_info</string> + + + + + 2 @@ -742,7 +554,7 @@ 0 - 20 + 17 reno_context @@ -787,7 +599,7 @@ 0 - 21 + 18 reno_context @@ -832,7 +644,43 @@ 0 - -11 + 19 + + reno_context + + + + + + + 2 + 86E1196533E771AEFD141DA43FCD980AE3D7689A45EDD54A2DF28B1943E0E7DB + 941210061 + 8706 + 487 + E23085202D084CBB50F289988A6A592F06D923B77D0AB25D7A98A7188DF5BE3B + 1414247481 + 766 + 7370 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>current_exception</string> + + + + + 2 @@ -841,7 +689,43 @@ 0 - -9 + 20 + + reno_context + + + + + + + 2 + 86E1196533E771AEFD141DA43FCD980AE3D7689A45EDD54A2DF28B1943E0E7DB + 941210061 + 8706 + 487 + 0066D4E6E6B189906E6DE04F08509F3737511701A1B1355B37511EC18E8371F4 + 2078296250 + 305 + 8138 + + + + + + 0 + ../../../../boost/exception_ptr.hpp + 0 + 0 + + + + + <string>copy_exception</string> + + + + + 2 @@ -850,7 +734,7 @@ 0 - 22 + 21 reno_context @@ -895,7 +779,7 @@ 0 - 23 + 22 reno_context @@ -940,7 +824,7 @@ 0 - 24 + 23 reno_context @@ -985,7 +869,7 @@ 0 - -5 + -7 2 @@ -994,7 +878,7 @@ 0 - 25 + 24 reno_context @@ -1035,7 +919,7 @@ 0 - 26 + 25 reno_context @@ -1084,7 +968,7 @@ 0 - 27 + 26 reno_context @@ -1125,7 +1009,7 @@ 0 - 28 + 27 reno_context @@ -1166,7 +1050,32 @@ 0 - -6 + 28 + + reno_context + + + + + + + 0 + + + + + + 1 + + + + + <string>boost/exception/enable_current_exception.hpp</string> + + + exception_enable_current_exception_hpp + + 2 @@ -1534,7 +1443,7 @@ 0 - -27 + -26 2 @@ -1579,7 +1488,7 @@ 0 - -28 + -27 2 @@ -1597,7 +1506,7 @@ 0 - -6 + -28 2 @@ -1624,7 +1533,7 @@ 0 - -10 + -11 2 @@ -1633,7 +1542,7 @@ 0 - -17 + -12 2 @@ -1642,7 +1551,43 @@ 0 - -8 + -13 + + + 2 + :) (:include + 1 + + 0 + + -14 + + + 2 + :) (:include + 1 + + 0 + + -15 + + + 2 + :) (:include + 1 + + 0 + + -16 + + + 2 + :) !!Transporting of Exceptions between Threads (:include + 1 + + 0 + + -17 2 @@ -1666,15 +1611,6 @@ 2 :) (:include 1 - - 0 - - -7 - - - 2 - :) !!Transporting of Exceptions between Threads (:include - 1 0 @@ -1693,24 +1629,6 @@ 2 :) (:include 1 - - 0 - - -11 - - - 2 - :) (:include - 1 - - 0 - - -9 - - - 2 - :) (:include - 1 0 @@ -1718,21 +1636,12 @@ 2 - :) (:include - 1 - - 0 - - -23 - - - 2 :) !!Printing Diagnostic Information (:include 1 0 - -24 + -23 2 @@ -1741,65 +1650,13 @@ 0 - -5 + -7 2 :) !!Acknowledgements Peter Dimov has been continuously influencing the design and evolution of Boost Exception. Also thanks to Tobias Schwinger, Tom Brinkman, Pavel Vozenilek and everyone who participated in the review process. - - - 0 - - -24 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -35 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -17 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -15 - - - - 1 - 2 - (:include include:) (:auto also:) - - 0 @@ -1814,27 +1671,27 @@ 1 - F4C951B28F7DE500973AA3DFAA99F2BADA6EDAFA2B406C30BEF3B7FBE6FD57D7 - 2263754923 - 982 - 306 + 4ED9709788BBAB4DE7CF336561606B8C0B41F70877A3395F4EE026F4AEB66CC6 + 743998427 + 409 + 307 0 - ../../example/error_info_2.cpp + ../../example/cloning_1.cpp 0 0 - <string>adding of arbitrary data to active exception objects</string> + <string>using enable_current_exception at the time of the throw</string> - adding_data_later + using_enable_cloning @@ -1843,6 +1700,175 @@ 0 + + + 0 + + -30 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -19 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -34 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -18 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -7 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -28 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -23 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -27 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -11 + + + + 1 + 2 + (:include include:) ---- !!!See Also: (:pagelist link="backlink" except_tags="exception,member" mod="w":) + + + + + 0 + + -26 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -32 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -36 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -21 + + + + 1 + 2 + (:include include:) (:auto also:) + + 0 @@ -1860,13 +1886,13 @@ 0 - -13 + -33 1 2 - (:include include:) (:auto also:) + (:include include:) (:auto also:) @@ -1882,19 +1908,15 @@ - 3 + 2 50E48ABD58B427E16B2EFA345D5FE67159057CB90F19AA1AD52C11991FD8500E 4076172629 8577 323 - 2D32D2DE11DB8BDD6F34C94CC165ABEF4F4CCB2D119354FA05811534E2AF356F - 1002290201 - 1604 - 3720 - DA154372D8C23BD9EDC30005CA7959CE686D198891097A837D006B5222F04DE9 - 2768248809 - 143 - 60 + 17E691632123EB67BA67D590B49EB8094F462F5A10A66A1C5438E1867EF1478E + 765399792 + 77 + 5326 @@ -1908,10 +1930,10 @@ - <string>exception::exception</string> + <string>exception::~exception</string> - exception_constructors + exception_destructor @@ -1922,19 +1944,6 @@ (:include include:) (:auto also:) - - - 0 - - -31 - - - - 1 - 2 - (:include include:) (:auto also:) - - 0 @@ -1978,176 +1987,6 @@ 0 - - - 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 - - - - - - - 2 - 50E48ABD58B427E16B2EFA345D5FE67159057CB90F19AA1AD52C11991FD8500E - 4076172629 - 8577 - 323 - 17E691632123EB67BA67D590B49EB8094F462F5A10A66A1C5438E1867EF1478E - 765399792 - 77 - 5326 - - - - - - 0 - ../../../../boost/exception/exception.hpp - 0 - 0 - - - - - <string>exception::~exception</string> - - - exception_destructor - - - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -33 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -28 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -23 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -14 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -19 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -27 - - - - 1 - 2 - (:include include:) (:auto also:) - - 0 @@ -2165,7 +2004,33 @@ 0 - 43 + -8 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -6 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + 41 reno_context @@ -2204,6 +2069,84 @@ 0 + + + 0 + + -24 + + + + 1 + 2 + (:include include:) (:pagelist link="backlink":) + + + + + 0 + + -17 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -14 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -9 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -10 + + + + 1 + 2 + (:include include:) (:auto also:) + + + + + 0 + + -12 + + + + 1 + 2 + (:include include:) (:auto also:) + + 0 @@ -2221,7 +2164,63 @@ 0 - -32 + 42 + + reno_context + + + + + + + 1 + F4C951B28F7DE500973AA3DFAA99F2BADA6EDAFA2B406C30BEF3B7FBE6FD57D7 + 2263754923 + 982 + 306 + + + + + + 0 + ../../example/error_info_2.cpp + 0 + 0 + + + + + <string>adding of arbitrary data to active exception objects</string> + + + adding_data_later + + + + + + 0 + + + + + 0 + + -37 + + + + 1 + 2 + (:auto !:) (:pagelist fmt="index" except_tags="index,noindex" mod="w":) + + + + + 0 + + -13 @@ -2234,7 +2233,90 @@ 0 - -18 + 43 + + 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 + + 44 + + reno_context + + + + + + + 3 + 50E48ABD58B427E16B2EFA345D5FE67159057CB90F19AA1AD52C11991FD8500E + 4076172629 + 8577 + 323 + 2D32D2DE11DB8BDD6F34C94CC165ABEF4F4CCB2D119354FA05811534E2AF356F + 1002290201 + 1604 + 3720 + DA154372D8C23BD9EDC30005CA7959CE686D198891097A837D006B5222F04DE9 + 2768248809 + 143 + 60 + + + + + + 0 + ../../../../boost/exception/exception.hpp + 0 + 0 + + + + + <string>exception::exception</string> + + + exception_constructors + + @@ -2247,13 +2329,13 @@ 0 - -25 + -35 1 2 - (:include include:) (:pagelist link="backlink":) + (:include include:) (:auto also:) @@ -2273,7 +2355,7 @@ 0 - -21 + -25 @@ -2286,7 +2368,7 @@ 0 - -26 + -31 @@ -2299,7 +2381,7 @@ 0 - -30 + -15 @@ -2308,88 +2390,6 @@ (:include include:) (:auto also:) - - - 0 - - 44 - - reno_context - - - - - - - 1 - 4ED9709788BBAB4DE7CF336561606B8C0B41F70877A3395F4EE026F4AEB66CC6 - 743998427 - 409 - 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 - - -34 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -36 - - - - 1 - 2 - (:include include:) (:auto also:) - - - - - 0 - - -37 - - - - 1 - 2 - (:auto !:) (:pagelist fmt="index" except_tags="index,noindex" mod="w":) - - @@ -2415,167 +2415,6 @@ 0 - - - 0 - - -6 - - - - 0 - - - - - 0 - - -7 - - - - 0 - - - - - 0 - - -8 - - - - 0 - - - - - 0 - - -9 - - - - 0 - - - - - 0 - - -10 - - - - 7 - 2 - [@class (:link - 1 - - 0 - - -10 - - - 2 - :) { protected: (:include - 1 - - 0 - - -39 - - - 2 - decl pre_indent="4":) (:include - 1 - - 0 - - -42 - - - 2 - decl pre_indent="4":) };@] - - - - - 0 - - -11 - - - - 0 - - - - - 0 - - -12 - - - - 0 - - - - - 0 - - -24 - - - - 0 - - - - - 0 - - -35 - - - - 0 - - - - - 0 - - -17 - - - - 3 - 2 - [@template <class Tag,class T> class (:link - 1 - - 0 - - -17 - - - 2 - :) { public: typedef T value_type; error_info( value_type const & ); };@] - - - - - 0 - - -15 - - - - 0 - - 0 @@ -2591,7 +2430,7 @@ 0 - -20 + -30 @@ -2602,7 +2441,7 @@ 0 - -13 + -19 @@ -2613,7 +2452,7 @@ 0 - -39 + -34 @@ -2624,7 +2463,7 @@ 0 - -31 + -18 @@ -2635,40 +2474,7 @@ 0 - -40 - - - - 0 - - - - - 0 - - -41 - - - - 0 - - - - - 0 - - -42 - - - - 0 - - - - - 0 - - -33 + -7 @@ -2697,28 +2503,6 @@ 0 - - - 0 - - -14 - - - - 0 - - - - - 0 - - -19 - - - - 0 - - 0 @@ -2734,29 +2518,47 @@ 0 - -22 + -11 - 0 + 7 + 2 + [@class (:link + 1 + + 0 + + -11 + + + 2 + :) { protected: (:include + 1 + + 0 + + -44 + + + 2 + decl pre_indent="4":) (:include + 1 + + 0 + + -39 + + + 2 + decl pre_indent="4":) };@] 0 - -43 - - - - 0 - - - - - 0 - - -16 + -26 @@ -2778,29 +2580,7 @@ 0 - -18 - - - - 0 - - - - - 0 - - -25 - - - - 0 - - - - - 0 - - -29 + -36 @@ -2822,7 +2602,7 @@ 0 - -26 + -20 @@ -2833,7 +2613,205 @@ 0 - -30 + -33 + + + + 0 + + + + + 0 + + -39 + + + + 0 + + + + + 0 + + -40 + + + + 0 + + + + + 0 + + -22 + + + + 0 + + + + + 0 + + -8 + + + + 0 + + + + + 0 + + -6 + + + + 0 + + + + + 0 + + -41 + + + + 0 + + + + + 0 + + -24 + + + + 0 + + + + + 0 + + -17 + + + + 0 + + + + + 0 + + -14 + + + + 0 + + + + + 0 + + -9 + + + + 0 + + + + + 0 + + -10 + + + + 0 + + + + + 0 + + -12 + + + + 3 + 2 + [@template <class Tag,class T> class (:link + 1 + + 0 + + -12 + + + 2 + :) { public: typedef T value_type; error_info( value_type const & ); };@] + + + + + 0 + + -16 + + + + 0 + + + + + 0 + + -42 + + + + 0 + + + + + 0 + + -37 + + + + 0 + + + + + 0 + + -13 + + + + 0 + + + + + 0 + + -43 @@ -2855,7 +2833,7 @@ 0 - -34 + -35 @@ -2866,7 +2844,7 @@ 0 - -36 + -29 @@ -2877,7 +2855,29 @@ 0 - -37 + -25 + + + + 0 + + + + + 0 + + -31 + + + + 0 + + + + + 0 + + -15 @@ -2913,7 +2913,18 @@ 0 - -6 + -38 + + + + 0 + + + + + 0 + + -30 @@ -2924,13 +2935,57 @@ 0 - -21 + -12 2 decl:)@] + + + 0 + + -19 + + + + 0 + + + + + 0 + + -34 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -14 + + + 2 + decl:)@] + + + + + 0 + + -18 + + + + 0 + + 0 @@ -2942,318 +2997,6 @@ 0 - - - 0 - - -8 - - - - 0 - - - - - 0 - - -9 - - - - 0 - - - - - 0 - - -10 - - - - 0 - - - - - 0 - - -11 - - - - 0 - - - - - 0 - - -12 - - - - 0 - - - - - 0 - - -24 - - - - 0 - - - - - 0 - - -35 - - - - 11 - 2 - [@(:include - 1 - - 0 - - -23 - - - 2 - decl:) (:include - 1 - - 0 - - -20 - - - 2 - decl:) (:include - 1 - - 0 - - -9 - - - 2 - decl:) (:include - 1 - - 0 - - -11 - - - 2 - decl:) (:include - 1 - - 0 - - -22 - - - 2 - decl:)@] - - - - - 0 - - -17 - - - - 0 - - - - - 0 - - -15 - - - - 0 - - - - - 0 - - -38 - - - - 0 - - - - - 0 - - -20 - - - - 0 - - - - - 0 - - -13 - - - - 0 - - - - - 0 - - -39 - - - - 0 - - - - - 0 - - -31 - - - - 11 - 2 - [@(:include - 1 - - 0 - - -10 - - - 2 - def:) (:include - 1 - - 0 - - -17 - - - 2 - decl:) typedef (:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_throw_function,char const *> throw_function; typedef (:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_throw_file,char const *> throw_file; typedef (:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_throw_line,int> throw_line;@] - - - - - 0 - - -40 - - - - 0 - - - - - 0 - - -41 - - - - 0 - - - - - 0 - - -42 - - - - 0 - - - - - 0 - - -33 - - - - 5 - 2 - [@(:include - 1 - - 0 - - -17 - - - 2 - def:) (:include - 1 - - 0 - - -8 - - - 2 - decl:)@] - - 0 @@ -3262,23 +3005,14 @@ - 5 + 3 2 [@(:include 1 0 - -10 - - - 2 - decl:) (:include - 1 - - 0 - - -24 + -18 2 @@ -3296,28 +3030,6 @@ 0 - - - 0 - - -14 - - - - 0 - - - - - 0 - - -19 - - - - 0 - - 0 @@ -3325,6 +3037,48 @@ -27 + + 5 + 2 + [@(:include + 1 + + 0 + + -11 + + + 2 + decl:) (:include + 1 + + 0 + + -23 + + + 2 + decl:)@] + + + + + 0 + + -11 + + + + 0 + + + + + 0 + + -26 + + 15 2 @@ -3333,7 +3087,7 @@ 0 - -28 + -27 2 @@ -3394,39 +3148,6 @@ :)>@] - - - 0 - - -22 - - - - 0 - - - - - 0 - - -43 - - - - 0 - - - - - 0 - - -16 - - - - 0 - - 0 @@ -3442,128 +3163,7 @@ 0 - -19 - - - 2 - decl:)@] - - - - - 0 - - -18 - - - - 0 - - - - - 0 - - -25 - - - - 0 - - - - - 0 - - -29 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -7 - - - 2 - decl:)@] - - - - - 0 - - -21 - - - - 0 - - - - - 0 - - -26 - - - - 0 - - - - - 0 - - -30 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -17 - - - 2 - decl:)@] - - - - - 0 - - -44 - - - - 0 - - - - - 0 - - -34 - - - - 3 - 2 - [@(:include - 1 - - 0 - - -18 + -15 2 @@ -3585,7 +3185,7 @@ 0 - -25 + -24 2 @@ -3594,13 +3194,220 @@ 0 - -5 + -7 2 decl:) }@] + + + 0 + + -21 + + + + 0 + + + + + 0 + + -20 + + + + 0 + + + + + 0 + + -33 + + + + 5 + 2 + [@(:include + 1 + + 0 + + -12 + + + 2 + def:) (:include + 1 + + 0 + + -13 + + + 2 + decl:)@] + + + + + 0 + + -39 + + + + 0 + + + + + 0 + + -40 + + + + 0 + + + + + 0 + + -22 + + + + 0 + + + + + 0 + + -8 + + + + 0 + + + + + 0 + + -6 + + + + 0 + + + + + 0 + + -41 + + + + 0 + + + + + 0 + + -24 + + + + 0 + + + + + 0 + + -17 + + + + 0 + + + + + 0 + + -14 + + + + 0 + + + + + 0 + + -9 + + + + 0 + + + + + 0 + + -10 + + + + 0 + + + + + 0 + + -12 + + + + 0 + + + + + 0 + + -16 + + + + 0 + + + + + 0 + + -42 + + + + 0 + + 0 @@ -3612,6 +3419,199 @@ 0 + + + 0 + + -13 + + + + 0 + + + + + 0 + + -43 + + + + 0 + + + + + 0 + + -44 + + + + 0 + + + + + 0 + + -35 + + + + 11 + 2 + [@(:include + 1 + + 0 + + -22 + + + 2 + decl:) (:include + 1 + + 0 + + -17 + + + 2 + decl:) (:include + 1 + + 0 + + -20 + + + 2 + decl:) (:include + 1 + + 0 + + -19 + + + 2 + decl:) (:include + 1 + + 0 + + -21 + + + 2 + decl:)@] + + + + + 0 + + -29 + + + + 3 + 2 + [@(:include + 1 + + 0 + + -16 + + + 2 + decl:)@] + + + + + 0 + + -25 + + + + 0 + + + + + 0 + + -31 + + + + 11 + 2 + [@(:include + 1 + + 0 + + -11 + + + 2 + def:) (:include + 1 + + 0 + + -12 + + + 2 + decl:) typedef (:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_throw_function,char const *> throw_function; typedef (:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_throw_file,char const *> throw_file; typedef (:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_throw_line,int> throw_line;@] + + + + + 0 + + -15 + + + + 0 + + @@ -3633,260 +3633,6 @@ -5 - - 5 - 2 - [@#ifdef BOOST_NO_EXCEPTIONS void (:link - 1 - - 0 - - -5 - - - 2 - :)( std::exception const & e ); // user defined #else template <class E> void (:link - 1 - - 0 - - -5 - - - 2 - :)( E const & e ); #endif@] - - - - - 0 - - -6 - - - - 0 - - - - - 0 - - -7 - - - - 3 - 2 - [@template <class T> ---unspecified--- (:link - 1 - - 0 - - -7 - - - 2 - :)( T const & x );@] - - - - - 0 - - -8 - - - - 5 - 2 - [@template <class E, class Tag, class T> E const & (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:)( E const & x, (:link - 1 - - 0 - - -17 - - - 2 - :)<Tag,T> const & v );@] - - - - - 0 - - -9 - - - - 5 - 2 - [@template <class T> (:link - 1 - - 0 - - -20 - - - 2 - :) (:link - 1 - - 0 - - -9 - - - 2 - :)( T const & e );@] - - - - - 0 - - -10 - - - - 3 - 2 - [@class (:link - 1 - - 0 - - -10 - - - 2 - :);@] - - - - - 0 - - -11 - - - - 5 - 2 - [@(:link - 1 - - 0 - - -20 - - - 2 - :) (:link - 1 - - 0 - - -11 - - - 2 - :)();@] - - - - - 0 - - -12 - - - - 0 - - - - - 0 - - -24 - - - - 5 - 2 - [@std::string (:link - 1 - - 0 - - -24 - - - 2 - :)( boost:: - 1 - - 0 - - -10 - - - 2 - const & x );@] - - - - - 0 - - -35 - - - - 0 - - - - - 0 - - -17 - - - - 3 - 2 - [@template <class Tag,class T> class (:link - 1 - - 0 - - -17 - - - 2 - :);@] - - - - - 0 - - -15 - - 0 @@ -3906,29 +3652,7 @@ 0 - -20 - - - - 3 - 2 - [@typedef ---unspecified--- (:link - 1 - - 0 - - -20 - - - 2 - :);@] - - - - - 0 - - -13 + -30 @@ -3939,47 +3663,38 @@ 0 - -39 + -19 - 7 + 5 2 [@(:link 1 0 - -39 + -17 2 - mod="m":)(); (:link + :) (:link 1 0 - -39 + -19 2 - mod="m":)( (:link - 1 - - 0 - - -10 - - - 2 - :) const & x );@] + :)();@] 0 - -31 + -34 @@ -3990,55 +3705,53 @@ 0 - -40 - - - - 0 - - - - - 0 - - -41 - - - - 0 - - - - - 0 - - -42 + -18 3 2 - [@(:link + [@template <class T> ---unspecified--- (:link 1 0 - -42 + -18 2 - mod="m":)();@] + :)( T const & e );@] 0 - -33 + -7 - 0 + 5 + 2 + [@#ifdef BOOST_NO_EXCEPTIONS void (:link + 1 + + 0 + + -7 + + + 2 + :)( std::exception const & e ); // user defined #else template <class E> void (:link + 1 + + 0 + + -7 + + + 2 + :)( E const & e ); #endif@] @@ -4062,7 +3775,7 @@ 5 2 - [@class (:link + [@std::string (:link 1 0 @@ -4071,49 +3784,16 @@ 2 - :): public std::exception public boost:: + :)( boost:: 1 0 - -10 + -11 2 - { ---unspecified--- };@] - - - - - 0 - - -14 - - - - 0 - - - - - 0 - - -19 - - - - 3 - 2 - [@template <class ErrorInfo,class E> (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:)<typename ErrorInfo::value_type const> (:link - 1 - - 0 - - -19 - - - 2 - :)( E const & x );@] + const & x );@] @@ -4131,49 +3811,29 @@ 0 - -22 + -11 - 5 + 3 2 - [@void (:link + [@class (:link 1 0 - -22 + -11 2 - :)( (:link - 1 - - 0 - - -20 - - - 2 - :) const & ep ); + :);@] 0 - -43 - - - - 0 - - - - - 0 - - -16 + -26 @@ -4195,47 +3855,188 @@ 0 - -18 + -36 - 7 - 2 - [@template <class E, class Tag1, class T1, ..., class TagN, class TN> E const & (:link - 1 - - 0 - - -18 - - - 2 - |operator<<:)( E const & x, (:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)< (:link - 1 - - 0 - - -17 - - - 2 - :)<Tag1,T1>, ..., (:link - 1 - - 0 - - -17 - - - 2 - :)<TagN,TN> > const & v );@] + 0 0 - -25 + -21 + + + + 5 + 2 + [@void (:link + 1 + + 0 + + -21 + + + 2 + :)( (:link + 1 + + 0 + + -17 + + + 2 + :) const & ep ); + + + + + 0 + + -20 + + + + 5 + 2 + [@template <class T> (:link + 1 + + 0 + + -17 + + + 2 + :) (:link + 1 + + 0 + + -20 + + + 2 + :)( T const & e );@] + + + + + 0 + + -33 + + + + 0 + + + + + 0 + + -39 + + + + 3 + 2 + [@(:link + 1 + + 0 + + -39 + + + 2 + mod="m":)();@] + + + + + 0 + + -40 + + + + 0 + + + + + 0 + + -22 + + + + 5 + 2 + [@class (:link + 1 + + 0 + + -22 + + + 2 + :): public std::exception public boost:: + 1 + + 0 + + -11 + + + 2 + { ---unspecified--- };@] + + + + + 0 + + -8 + + + + 0 + + + + + 0 + + -6 + + + + 0 + + + + + 0 + + -41 + + + + 0 + + + + + 0 + + -24 @@ -4255,7 +4056,7 @@ 0 - -25 + -24 2 @@ -4264,7 +4065,7 @@ 0 - -5 + -7 2 @@ -4273,7 +4074,7 @@ 0 - -7 + -16 2 @@ -4309,7 +4110,7 @@ 0 - -25 + -24 2 @@ -4318,13 +4119,256 @@ 0 - -5 + -7 2 (x) #endif@] + + + 0 + + -17 + + + + 3 + 2 + [@typedef ---unspecified--- (:link + 1 + + 0 + + -17 + + + 2 + :);@] + + + + + 0 + + -14 + + + + 7 + 2 + [@template <class E, class Tag1, class T1, ..., class TagN, class TN> E const & (:link + 1 + + 0 + + -14 + + + 2 + |operator<<:)( E const & x, (:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)< (:link + 1 + + 0 + + -12 + + + 2 + :)<Tag1,T1>, ..., (:link + 1 + + 0 + + -12 + + + 2 + :)<TagN,TN> > const & v );@] + + + + + 0 + + -9 + + + + 0 + + + + + 0 + + -10 + + + + 0 + + + + + 0 + + -12 + + + + 3 + 2 + [@template <class Tag,class T> class (:link + 1 + + 0 + + -12 + + + 2 + :);@] + + + + + 0 + + -16 + + + + 3 + 2 + [@template <class T> ---unspecified--- (:link + 1 + + 0 + + -16 + + + 2 + :)( T const & x );@] + + + + + 0 + + -42 + + + + 0 + + + + + 0 + + -37 + + + + 0 + + + + + 0 + + -13 + + + + 5 + 2 + [@template <class E, class Tag, class T> E const & (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:)( E const & x, (:link + 1 + + 0 + + -12 + + + 2 + :)<Tag,T> const & v );@] + + + + + 0 + + -43 + + + + 0 + + + + + 0 + + -44 + + + + 7 + 2 + [@(:link + 1 + + 0 + + -44 + + + 2 + mod="m":)(); (:link + 1 + + 0 + + -44 + + + 2 + mod="m":)( (:link + 1 + + 0 + + -11 + + + 2 + :) const & x );@] + + + + + 0 + + -35 + + + + 0 + + 0 @@ -4340,88 +4384,44 @@ 0 - -21 + -25 + + + + 0 + + + + + 0 + + -31 + + + + 0 + + + + + 0 + + -15 3 2 - [@template <class T> ---unspecified--- (:link + [@template <class ErrorInfo,class E> (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:)<typename ErrorInfo::value_type const> (:link 1 0 - -21 + -15 2 - :)( T const & e );@] - - - - - 0 - - -26 - - - - 0 - - - - - 0 - - -30 - - - - 0 - - - - - 0 - - -44 - - - - 0 - - - - - 0 - - -34 - - - - 0 - - - - - 0 - - -36 - - - - 0 - - - - - 0 - - -37 - - - - 0 + :)( E const & x );@] @@ -4445,702 +4445,10 @@ -5 - - 13 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: E must derive publicly from std::exception. !!!!Effects: * If BOOST_NO_EXCEPTIONS is not defined, boost::(:link - 1 - - 0 - - -5 - - - 2 - :)(e) is equivalent to throw boost::(:link - 1 - - 0 - - -21 - - - 2 - :)(boost::(:link - 1 - - 0 - - -7 - - - 2 - :)(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::(:link - 1 - - 0 - - -5 - - - 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 - - -5 - - - 2 - :) are allowed to assume that the function never returns; therefore, if the user-defined (:link - 1 - - 0 - - -5 - - - 2 - :) returns, the behavior is undefined. - - - - - 0 - - -6 - - - - 1 - 2 - (:auto !!!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -7 - - - - 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 - - -10 - - - 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 - - -10 - - - 2 - :). The T sub-object is initialized from x by the T copy constructor. !!!!Throws: Nothing. - - - - - 0 - - -8 - - - - 7 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link - 1 - - 0 - - -10 - - - 2 - :), or a type that derives (indirectly) from boost::(:link - 1 - - 0 - - -10 - - - 2 - :). !!!!Effects: Stores a copy of v into x. If x already contains data of type (:link - 1 - - 0 - - -17 - - - 2 - :)<Tag,T>, that data is overwritten. !!!!Returns: x. (:include throws:) - - - - - 0 - - -9 - - - - 5 - 2 - (:auto !!!:) (:include synopsis:) !!!!Effects: As if [@try { throw - 1 - - 0 - - -21 - - - 2 - (e); } catch(...) { return (:link - 1 - - 0 - - -11 - - - 2 - :)(); }@] - - - - - 0 - - -10 - - - - 13 - 2 - (:auto !!!:) (:include synopsis:) Class boost::(:link - 1 - - 0 - - -10 - - - 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 - - -10 - - - 2 - :) can store data of arbitrary types, using the (:link - 1 - - 0 - - -17 - - - 2 - :) wrapper and (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:). To retrieve data from a boost::(:link - 1 - - 0 - - -10 - - - 2 - :) object, use the (:link - 1 - - 0 - - -19 - - - 2 - :) function template. - - - - - 0 - - -11 - - - - 29 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: The (:link - 1 - - 0 - - -11 - - - 2 - :) function must not be called outside of a catch block. !!!!Returns: * An (:link - 1 - - 0 - - -20 - - - 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 - - -20 - - - 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 - - -11 - - - 2 - :) refer to the same exception object. * Correct implementation of (:link - 1 - - 0 - - -11 - - - 2 - :) may require compiler support, unless (:link - 1 - - 0 - - -21 - - - 2 - :) was used at the time the currently handled exception object was passed to throw. If (:link - 1 - - 0 - - -21 - - - 2 - :) was not used, and if the compiler does not provide the necessary support, then (:link - 1 - - 0 - - -11 - - - 2 - :) may return an (:link - 1 - - 0 - - -20 - - - 2 - :) that refers to an instance of (:link - 1 - - 0 - - -23 - - - 2 - :). In this case, if the original exception object derives from boost::(:link - 1 - - 0 - - -10 - - - 2 - :), then the boost::(:link - 1 - - 0 - - -10 - - - 2 - :) sub-object of the (:link - 1 - - 0 - - -23 - - - 2 - :) object is initialized by the boost::(:link - 1 - - 0 - - -10 - - - 2 - :) copy constructor. - - - - - 0 - - -12 - - 0 - - - 0 - - -24 - - - - 7 - 2 - (:auto !!!:) (:include synopsis:) !!!!Returns: This function iterates over all data objects stored in the boost::(:link - 1 - - 0 - - -10 - - - 2 - :) through (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:). The returned string is constructed by converting each data object to string and then concatenating these strings together. When the (:link - 1 - - 0 - - -17 - - - 2 - :)<Tag,T> template is instantiated, the system attempts overload resolution for an unqualified call to to_string(x), where x is of type T. If this is successful, the to_string overload is expected to return std::string and is used to convert objects of type T to string. Otherwise, the system attempts overload resolution for s << x, where s is a std::ostringstream and x is of type T. If this is successful, the operator<< overload is used to convert objects of type T to string. Otherwise the system is unable to convert objects of type T to string, and an unspecified stub string value is used without issuing a compile error. !!!!Notes: *The format of the returned string is unspecified. *The returned string is ''not'' user-friendly. *If dynamic_cast<std::exception const *>(&x) is not null, the returned string includes the output from std::exception::what. *The returned string may include additional platform-specific diagnostic information. - - - - - 0 - - -35 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -17 - - - - 25 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: T must have accessible copy constructor and must not be a reference (there is no requirement that T's copy constructor does not throw.) !!!!Description: This class template is used to associate a Tag type with a value type T. Objects of type (:link - 1 - - 0 - - -17 - - - 2 - :)<Tag,T> can be passed to (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:) to be stored in objects of type boost::(:link - 1 - - 0 - - -10 - - - 2 - :). !!!!Note: The header <(:link - 1 - - 0 - - -30 - - - 2 - :)> provides a declaration of the (:link - 1 - - 0 - - -17 - - - 2 - :) template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, like this: [@#include <(:link - 1 - - 0 - - -30 - - - 2 - :)> typedef boost::(:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_errno,int> errno_info;@] Of course, to actually add an (:link - 1 - - 0 - - -17 - - - 2 - :) object to (:link - 1 - - 0 - - -10 - - - 2 - mod="p":) using (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:), or to retrieve it using (:link - 1 - - 0 - - -19 - - - 2 - :), you must first #include <(:link - 1 - - 0 - - -33 - - - 2 - :)>. - - - - - 0 - - -15 - - - - 27 - 2 - (:auto !!:) Some exception hierarchies can not be modified to make boost::(:link - 1 - - 0 - - -10 - - - 2 - :) a base type. In this case, the (:link - 1 - - 0 - - -7 - - - 2 - :) function template can be used to make exception objects derive from boost::(:link - 1 - - 0 - - -10 - - - 2 - :) anyway. Here is an example: [@#include <(:link - 1 - - 0 - - -27 - - - 2 - :)> #include <stdexcept> typedef boost::(:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_std_range_min,size_t> std_range_min; typedef boost::(:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_std_range_max,size_t> std_range_max; typedef boost::(:link - 1 - - 0 - - -17 - - - 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 - - -7 - - - 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 - - -7 - - - 2 - :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link - 1 - - 0 - - -10 - - - 2 - :) and T. This makes it possible to use (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:) to store additional information in the exception object. The exception can be intercepted as T &, so existing exception handling will not break. It can also be intercepted as boost::(:link - 1 - - 0 - - -10 - - - 2 - :) &, so that (:link - 1 - - 0 - - -14 - - - 2 - |more information can be added to the exception at a later time:). - - 0 @@ -5148,1236 +4456,6 @@ -38 - - 21 - 2 - (:auto !!!:) Sometimes the throw site does not have all the information that is needed at the catch site to make sense of what went wrong. Here is an example: [@#include <stdio.h> #include <string> class file_read_error { public: explicit file_read_error( std::string const & fn ): fn_(fn) { }; std::string const & file_name() const { return fn_; } private: std::string fn_; }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error("????"); }@] We have defined an exception class file_read_error which can store a file name, so that when we catch a file_read_error object, we know which file the failure is related to. However, the file_read function does not have the file name at the time of the throw; all it has is a FILE handle. One possible solution is to not use FILE handles directly. We could have our own class file which stores both a FILE handle and a file name, and pass that to file_read. However, this could be problematic if we communicate with 3rd party code that does not use our class file (probably because they have their own similar class.) A better solution is to make class file_read_error derive (possibly indirectly) from boost::(:link - 1 - - 0 - - -10 - - - 2 - :), and free the file_read function from the burden of storing the file name in exceptions it throws: [@#include <(:link - 1 - - 0 - - -27 - - - 2 - :)> #include <stdio.h> #include <errno.h> typedef boost::(:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_errno,int> errno_info; class file_read_error: public boost::(:link - 1 - - 0 - - -10 - - - 2 - :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error() << errno_info(errno); }@] If file_read detects a failure, it throws an exception which contains the information that is available at the time, namely the errno. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally: [@#include <(:link - 1 - - 0 - - -27 - - - 2 - :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> typedef boost::(:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_file_name,std::string> file_name_info; boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode ); void file_read( FILE * f, void * buffer, size_t size ); void parse_file( char const * file_name ) { boost::shared_ptr<FILE> f = file_open(file_name,"rb"); assert(f); try { char buf[1024]; file_read( f.get(), buf, sizeof(buf) ); } catch( boost::(:link - 1 - - 0 - - -10 - - - 2 - :) & e ) { e << file_name_info(file_name); throw; } }@] The above function is (almost) exception-neutral -- if an exception is emitted by any function call within the try block, parse_file does not need to do any real work, but it intercepts any boost::(:link - 1 - - 0 - - -10 - - - 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 - - -10 - - - 2 - :) object is that the file name is relevant to any failure that occurs in parse_file, ''even if the failure is unrelated to file I/O''. As usual, the stored data can be retrieved using (:link - 1 - - 0 - - -19 - - - 2 - :). - - - - - 0 - - -20 - - - - 17 - 2 - (:auto !!!:) (:include synopsis:) The (:link - 1 - - 0 - - -20 - - - 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 - - -20 - - - 2 - :)'s operations do not throw. Two instances of (:link - 1 - - 0 - - -20 - - - 2 - :) are equivalent and compare equal if and only if they refer to the same exception. The default constructor of (:link - 1 - - 0 - - -20 - - - 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 - - -20 - - - 2 - :) references to the same exception object. * It is illegal for multiple threads to modify the same (:link - 1 - - 0 - - -20 - - - 2 - :) object concurrently. * While calling (:link - 1 - - 0 - - -11 - - - 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 - - -22 - - - 2 - :) concurrently to throw the same exception object into multiple threads. - - - - - 0 - - -13 - - - - 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 - - -21 - - - 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 - - -5 - - - 2 - :) are guaranteed to derive from boost::(:link - 1 - - 0 - - -10 - - - 2 - :) and to support cloning. (:include - 1 - - 0 - - -44 - - - 2 - :) (:include - 1 - - 0 - - -41 - - - 2 - :) - - - - - 0 - - -39 - - - - 7 - 2 - (:auto !!!:) (:include decl:) !!!!Effects: * Default constructor: initializes an empty boost::(:link - 1 - - 0 - - -10 - - - 2 - :) object. * Copy constructor: initializes a boost::(:link - 1 - - 0 - - -10 - - - 2 - :) object which shares ownership with x of all data added through (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:), including data that is added at a future time. !!!!Throws: Nothing. - - - - - 0 - - -31 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -40 - - - - 17 - 2 - (:auto !!!:) The following example demonstrates how errno can be stored in exception objects using Boost Exception: [@#include <(:link - 1 - - 0 - - -27 - - - 2 - :)> #include <errno.h> #include <iostream> typedef boost::(:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_errno,int> errno_info; //(1) class my_error: public boost::(:link - 1 - - 0 - - -10 - - - 2 - :), public std::exception { }; //(2) void f() { throw my_error() << errno_info(errno); //(3) } @] First, we instantiate the (:link - 1 - - 0 - - -17 - - - 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 - - -10 - - - 2 - :). Finally, (3) illustrates how the typedef from (1) can be used with (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:) to store values in exception objects at the point of the throw. The stored errno value can be recovered at a later time like this: [@// ...continued void g() { try { f(); } catch( my_error & x ) { if( boost::shared_ptr<int const> err=boost::(:link - 1 - - 0 - - -19 - - - 2 - :)<errno_info>(x) ) std::cerr << "Error code: " << *err; } }@] The (:link - 1 - - 0 - - -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, the returned (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) will point to it; otherwise an empty (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) is returned. - - - - - 0 - - -41 - - - - 37 - 2 - (:auto !!!:) When you catch an exception, you can call (:link - 1 - - 0 - - -11 - - - 2 - :) to get an (:link - 1 - - 0 - - -20 - - - 2 - :) object: [@#include <(:link - 1 - - 0 - - -35 - - - 2 - :)> #include <boost/thread.hpp> #include <boost/bind.hpp> void do_work(); //throws cloning-enabled boost::(:link - 1 - - 0 - - -10 - - - 2 - :)s void worker_thread( boost::(:link - 1 - - 0 - - -20 - - - 2 - :) & error ) { try { do_work(); error = boost::(:link - 1 - - 0 - - -20 - - - 2 - :)(); } catch( ... ) { error = boost::(:link - 1 - - 0 - - -11 - - - 2 - :)(); } }@] In the above example, note that (:link - 1 - - 0 - - -11 - - - 2 - :) captures the original type of the exception object. The exception can be thrown again using the (:link - 1 - - 0 - - -22 - - - 2 - :) function: [@// ...continued void work() { boost::(:link - 1 - - 0 - - -20 - - - 2 - :) error; boost::(:link http://www.boost.org/doc/html/boost/thread.html|thread:) t( boost::(:link http://www.boost.org/libs/bind/bind.html|bind:)(worker_thread,boost::(:link http://www.boost.org/doc/html/ref.html|ref:)(error)) ); t.(:link http://www.boost.org/doc/html/boost/thread.html|join:)(); if( error ) boost::(:link - 1 - - 0 - - -22 - - - 2 - :)(error); }@] Note that (:link - 1 - - 0 - - -11 - - - 2 - :) could fail to copy the original exception object in the following cases: * if there is not enough memory, in which case the returned (:link - 1 - - 0 - - -20 - - - 2 - :) points to an instance of std::bad_alloc, or * if (:link - 1 - - 0 - - -21 - - - 2 - :) was not used in the throw-expression passed to the original throw statement and the current implementation does not have the necessary compiler-specific support to copy the exception automatically, in which case the returned (:link - 1 - - 0 - - -20 - - - 2 - :) points to an instance of (:link - 1 - - 0 - - -23 - - - 2 - :). Regardless, the use of (:link - 1 - - 0 - - -11 - - - 2 - :) and (:link - 1 - - 0 - - -22 - - - 2 - :) in the above examples is well-formed. - - - - - 0 - - -42 - - - - 3 - 2 - (:auto !!!:) (:include decl:) !!!!Effects: Frees all resources associated with a boost::(:link - 1 - - 0 - - -10 - - - 2 - :) object. !!!!Throws: Nothing. - - - - - 0 - - -33 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -28 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -23 - - - - 5 - 2 - (:auto !!!:) (:include synopsis:) This type is used by the (:link - 1 - - 0 - - -20 - - - 2 - :) support in Boost Exception. Please see (:link - 1 - - 0 - - -11 - - - 2 - :). - - - - - 0 - - -14 - - - - 11 - 2 - (:auto !!:) All exception types that derive from boost::(:link - 1 - - 0 - - -10 - - - 2 - :) can be used as type-safe containers of arbitrary data objects, while complying with the no-throw requirements (15.5.1) of the ANSI C++ standard for exception types. Data can be added to a boost::(:link - 1 - - 0 - - -10 - - - 2 - :) at the time of the throw, or at a later time. (:include - 1 - - 0 - - -40 - - - 2 - :) (:include - 1 - - 0 - - -38 - - - 2 - :) (:include - 1 - - 0 - - -43 - - - 2 - :) - - - - - 0 - - -19 - - - - 13 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: * ErrorInfo must be an instance of the (:link - 1 - - 0 - - -17 - - - 2 - :) template. * E must be polymorphic. * The (:link - 1 - - 0 - - -19 - - - 2 - :) function must not be called outside of a catch block. !!!!Returns: * If dynamic_cast<boost::(:link - 1 - - 0 - - -10 - - - 2 - :) const *>(&x) is 0, or if x does not store an object of type ErrorInfo, the returned value is an empty shared_ptr. * Otherwise, the returned shared_ptr points to the stored value (use (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:) to store values in exception objects.) The shared_ptr is valid even after x has been destroyed. !!!!Throws: Nothing. !!!!Note: The interface of - 1 - - 0 - - -19 - - - 2 - may be affected by the build - 1 - - 0 - - -26 - - - 2 - . - - - - - 0 - - -27 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -22 - - - - 1 - 2 - (:auto !!!:) (:include synopsis:) !!!!Precondition: ep shall not be null. !!!!Throws: The exception to which ep refers. - - - - - 0 - - -43 - - - - 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 - - -34 - - - 2 - :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> #include <errno.h> typedef boost::(:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_file_name,std::string> file_name_info; typedef boost::(:link - 1 - - 0 - - -17 - - - 2 - :)<struct tag_function,char const *> function_info; typedef boost::(:link - 1 - - 0 - - -17 - - - 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 - - -10 - - - 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 - - -19 - - - 2 - :). - - - - - 0 - - -16 - - - - 17 - 2 - (:auto !!:) Boost Exception provides a namespace-scope function (:link - 1 - - 0 - - -24 - - - 2 - :) which takes a boost::(:link - 1 - - 0 - - -10 - - - 2 - :). The returned string contains: *the string representation of all data objects added to the boost::(:link - 1 - - 0 - - -10 - - - 2 - :) through (:link - 1 - - 0 - - -8 - - - 2 - |operator<<:); *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 - - -27 - - - 2 - :)> #include <iostream> void f(); //throws unknown types that derive from boost::(:link - 1 - - 0 - - -10 - - - 2 - :). void g() { try { f(); } catch( boost::(:link - 1 - - 0 - - -10 - - - 2 - :) & e ) { std::cerr << (:link - 1 - - 0 - - -24 - - - 2 - :)(e); } }@] - - - - - 0 - - -32 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -18 - - - - 5 - 2 - (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link - 1 - - 0 - - -10 - - - 2 - :), or a type that derives (indirectly) from boost::(:link - 1 - - 0 - - -10 - - - 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 - - -25 - - - - 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 - - -5 - - - 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 - - -24 - - - 2 - . - - - - - 0 - - -29 - - - - 1 - 2 - (:auto !!!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -21 - - - - 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 - - -20 - - - 2 - :) support in Boost Exception. For example: [@class my_exception: public std::exception { }; .... throw boost::(:link - 1 - - 0 - - -21 - - - 2 - :)(my_exception());@] Unless (:link - 1 - - 0 - - -21 - - - 2 - :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link - 1 - - 0 - - -11 - - - 2 - :) may return an (:link - 1 - - 0 - - -20 - - - 2 - :) which refers to an instance of (:link - 1 - - 0 - - -23 - - - 2 - :). See (:link - 1 - - 0 - - -11 - - - 2 - :) for details. !!!!Note: Instead of using the throw keyword directly, it is preferable to call boost::(:link - 1 - - 0 - - -5 - - - 2 - :). This is guaranteed to throw an exception that derives from boost::(:link - 1 - - 0 - - -10 - - - 2 - :) and supports the (:link - 1 - - 0 - - -20 - - - 2 - :) functionality. - - - - - 0 - - -26 - - - - 15 - 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. Defining either macro does not have an observable degrading effect on the library functionality, except for the following: ->By default, the - 1 - - 0 - - -19 - - - 2 - function template can be called with any exception type. If BOOST_NO_RTTI is defined, - 1 - - 0 - - -19 - - - 2 - can be used only with objects of type boost:: - 1 - - 0 - - -10 - - - 2 - . ''Note: the configuration where BOOST_NO_RTTI is defined but BOOST_NO_TYPEID is not defined is specific for MSVC compilers; it reduces RTTI overhead without fully disabling std::type_info. For most (all?) other compilers, to use Boost Exception without RTTI, both BOOST_NO_RTTI and BOOST_NO_TYPEID must be defined.'' '''BOOST_EXCEPTION_DISABLE''' By default, - 1 - - 0 - - -21 - - - 2 - and - 1 - - 0 - - -7 - - - 2 - are integrated directly in the - 1 - - 0 - - -5 - - - 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 - 1 - - 0 - - -36 - - - 2 - . - - - - - 0 - - -30 - - - - 1 - 2 - (:auto !!:) !!!Synopsis (:include synopsis:) - - - - - 0 - - -44 - - 11 2 @@ -6395,7 +4473,7 @@ 0 - -10 + -11 2 @@ -6404,7 +4482,7 @@ 0 - -21 + -18 2 @@ -6413,7 +4491,7 @@ 0 - -21 + -18 2 @@ -6422,13 +4500,165 @@ 0 - -10 + -11 2 :). + + + 0 + + -30 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -19 + + + + 29 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: The (:link + 1 + + 0 + + -19 + + + 2 + :) function must not be called outside of a catch block. !!!!Returns: * An (:link + 1 + + 0 + + -17 + + + 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 + + -17 + + + 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 + + -19 + + + 2 + :) refer to the same exception object. * Correct implementation of (:link + 1 + + 0 + + -19 + + + 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 + + -19 + + + 2 + :) may return an (:link + 1 + + 0 + + -17 + + + 2 + :) that refers to an instance of (:link + 1 + + 0 + + -22 + + + 2 + :). In this case, if the original exception object derives from boost::(:link + 1 + + 0 + + -11 + + + 2 + :), then the boost::(:link + 1 + + 0 + + -11 + + + 2 + :) sub-object of the (:link + 1 + + 0 + + -22 + + + 2 + :) object is initialized by the boost::(:link + 1 + + 0 + + -11 + + + 2 + :) copy constructor. + + 0 @@ -6442,6 +4672,335 @@ (:auto !!:) !!!Synopsis (:include synopsis:) + + + 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 + + -17 + + + 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 + + -19 + + + 2 + :) may return an (:link + 1 + + 0 + + -17 + + + 2 + :) which refers to an instance of (:link + 1 + + 0 + + -22 + + + 2 + :). See (:link + 1 + + 0 + + -19 + + + 2 + :) for details. !!!!Note: Instead of using the throw keyword directly, it is preferable to call boost::(:link + 1 + + 0 + + -7 + + + 2 + :). This is guaranteed to throw an exception that derives from boost::(:link + 1 + + 0 + + -11 + + + 2 + :) and supports the (:link + 1 + + 0 + + -17 + + + 2 + :) functionality. + + + + + 0 + + -7 + + + + 13 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: E must derive publicly from std::exception. !!!!Effects: * If BOOST_NO_EXCEPTIONS is not defined, boost::(:link + 1 + + 0 + + -7 + + + 2 + :)(e) is equivalent to throw boost::(:link + 1 + + 0 + + -18 + + + 2 + :)(boost::(:link + 1 + + 0 + + -16 + + + 2 + :)(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::(:link + 1 + + 0 + + -7 + + + 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 + + -7 + + + 2 + :) are allowed to assume that the function never returns; therefore, if the user-defined (:link + 1 + + 0 + + -7 + + + 2 + :) returns, the behavior is undefined. + + + + + 0 + + -28 + + + + 1 + 2 + (:auto !!!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -23 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) !!!!Returns: This function iterates over all data objects stored in the boost::(:link + 1 + + 0 + + -11 + + + 2 + :) through (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:). The returned string is constructed by converting each data object to string and then concatenating these strings together. When the (:link + 1 + + 0 + + -12 + + + 2 + :)<Tag,T> template is instantiated, the system attempts overload resolution for an unqualified call to to_string(x), where x is of type T. If this is successful, the to_string overload is expected to return std::string and is used to convert objects of type T to string. Otherwise, the system attempts overload resolution for s << x, where s is a std::ostringstream and x is of type T. If this is successful, the operator<< overload is used to convert objects of type T to string. Otherwise the system is unable to convert objects of type T to string, and an unspecified stub string value is used without issuing a compile error. !!!!Notes: *The format of the returned string is unspecified. *The returned string is ''not'' user-friendly. *If dynamic_cast<std::exception const *>(&x) is not null, the returned string includes the output from std::exception::what. *The returned string may include additional platform-specific diagnostic information. + + + + + 0 + + -27 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -11 + + + + 13 + 2 + (:auto !!!:) (:include synopsis:) Class boost::(:link + 1 + + 0 + + -11 + + + 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 + + -11 + + + 2 + :) can store data of arbitrary types, using the (:link + 1 + + 0 + + -12 + + + 2 + :) wrapper and (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:). To retrieve data from a boost::(:link + 1 + + 0 + + -11 + + + 2 + :) object, use the (:link + 1 + + 0 + + -15 + + + 2 + :) function template. + + + + + 0 + + -26 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -32 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + 0 @@ -6455,6 +5014,1010 @@ (:auto !!:) !!!Synopsis (:include synopsis:) + + + 0 + + -21 + + + + 1 + 2 + (:auto !!!:) (:include synopsis:) !!!!Precondition: ep shall not be null. !!!!Throws: The exception to which ep refers. + + + + + 0 + + -20 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) !!!!Effects: As if [@try { throw + 1 + + 0 + + -18 + + + 2 + (e); } catch(...) { return (:link + 1 + + 0 + + -19 + + + 2 + :)(); }@] + + + + + 0 + + -33 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -39 + + + + 3 + 2 + (:auto !!!:) (:include decl:) !!!!Effects: Frees all resources associated with a boost::(:link + 1 + + 0 + + -11 + + + 2 + :) object. !!!!Throws: Nothing. + + + + + 0 + + -40 + + + + 17 + 2 + (:auto !!!:) The following example demonstrates how errno can be stored in exception objects using Boost Exception: [@#include <(:link + 1 + + 0 + + -26 + + + 2 + :)> #include <errno.h> #include <iostream> typedef boost::(:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_errno,int> errno_info; //(1) class my_error: public boost::(:link + 1 + + 0 + + -11 + + + 2 + :), public std::exception { }; //(2) void f() { throw my_error() << errno_info(errno); //(3) } @] First, we instantiate the (:link + 1 + + 0 + + -12 + + + 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 + + -11 + + + 2 + :). Finally, (3) illustrates how the typedef from (1) can be used with (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:) to store values in exception objects at the point of the throw. The stored errno value can be recovered at a later time like this: [@// ...continued void g() { try { f(); } catch( my_error & x ) { if( boost::shared_ptr<int const> err=boost::(:link + 1 + + 0 + + -15 + + + 2 + :)<errno_info>(x) ) std::cerr << "Error code: " << *err; } }@] The (:link + 1 + + 0 + + -15 + + + 2 + :) function template is instantiated with the typedef from (1), and is passed an exception object of a polymorphic type. If the exception object contains the requested value, the returned (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) will point to it; otherwise an empty (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) is returned. + + + + + 0 + + -22 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) This type is used by the (:link + 1 + + 0 + + -17 + + + 2 + :) support in Boost Exception. Please see (:link + 1 + + 0 + + -19 + + + 2 + :). + + + + + 0 + + -8 + + + + 11 + 2 + (:auto !!:) All exception types that derive from boost::(:link + 1 + + 0 + + -11 + + + 2 + :) can be used as type-safe containers of arbitrary data objects, while complying with the no-throw requirements (15.5.1) of the ANSI C++ standard for exception types. Data can be added to a boost::(:link + 1 + + 0 + + -11 + + + 2 + :) at the time of the throw, or at a later time. (:include + 1 + + 0 + + -40 + + + 2 + :) (:include + 1 + + 0 + + -42 + + + 2 + :) (:include + 1 + + 0 + + -41 + + + 2 + :) + + + + + 0 + + -6 + + + + 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 + + -18 + + + 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 + + -7 + + + 2 + :) are guaranteed to derive from boost::(:link + 1 + + 0 + + -11 + + + 2 + :) and to support cloning. (:include + 1 + + 0 + + -38 + + + 2 + :) (:include + 1 + + 0 + + -43 + + + 2 + :) + + + + + 0 + + -41 + + + + 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 + + -34 + + + 2 + :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> #include <errno.h> typedef boost::(:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_file_name,std::string> file_name_info; typedef boost::(:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_function,char const *> function_info; typedef boost::(:link + 1 + + 0 + + -12 + + + 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 + + -11 + + + 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 + + -15 + + + 2 + :). + + + + + 0 + + -24 + + + + 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 + + -7 + + + 2 + . To recover this information at the catch site, use + 1 + + 0 + + -15 + + + 2 + ; the information is also included in the message returned by + 1 + + 0 + + -23 + + + 2 + . + + + + + 0 + + -17 + + + + 17 + 2 + (:auto !!!:) (:include synopsis:) The (:link + 1 + + 0 + + -17 + + + 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 + + -17 + + + 2 + :)'s operations do not throw. Two instances of (:link + 1 + + 0 + + -17 + + + 2 + :) are equivalent and compare equal if and only if they refer to the same exception. The default constructor of (:link + 1 + + 0 + + -17 + + + 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 + + -17 + + + 2 + :) references to the same exception object. * It is illegal for multiple threads to modify the same (:link + 1 + + 0 + + -17 + + + 2 + :) object concurrently. * While calling (:link + 1 + + 0 + + -19 + + + 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 + + -21 + + + 2 + :) concurrently to throw the same exception object into multiple threads. + + + + + 0 + + -14 + + + + 5 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link + 1 + + 0 + + -11 + + + 2 + :), or a type that derives (indirectly) from boost::(:link + 1 + + 0 + + -11 + + + 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 + + + + 27 + 2 + (:auto !!:) Some exception hierarchies can not be modified to make boost::(:link + 1 + + 0 + + -11 + + + 2 + :) a base type. In this case, the (:link + 1 + + 0 + + -16 + + + 2 + :) function template can be used to make exception objects derive from boost::(:link + 1 + + 0 + + -11 + + + 2 + :) anyway. Here is an example: [@#include <(:link + 1 + + 0 + + -26 + + + 2 + :)> #include <stdexcept> typedef boost::(:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_std_range_min,size_t> std_range_min; typedef boost::(:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_std_range_max,size_t> std_range_max; typedef boost::(:link + 1 + + 0 + + -12 + + + 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 + + -16 + + + 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 + + -16 + + + 2 + :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link + 1 + + 0 + + -11 + + + 2 + :) and T. This makes it possible to use (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:) to store additional information in the exception object. The exception can be intercepted as T &, so existing exception handling will not break. It can also be intercepted as boost::(:link + 1 + + 0 + + -11 + + + 2 + :) &, so that (:link + 1 + + 0 + + -8 + + + 2 + |more information can be added to the exception at a later time:). + + + + + 0 + + -10 + + + + 17 + 2 + (:auto !!:) Boost Exception provides a namespace-scope function (:link + 1 + + 0 + + -23 + + + 2 + :) which takes a boost::(:link + 1 + + 0 + + -11 + + + 2 + :). The returned string contains: *the string representation of all data objects added to the boost::(:link + 1 + + 0 + + -11 + + + 2 + :) through (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:); *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 + + -26 + + + 2 + :)> #include <iostream> void f(); //throws unknown types that derive from boost::(:link + 1 + + 0 + + -11 + + + 2 + :). void g() { try { f(); } catch( boost::(:link + 1 + + 0 + + -11 + + + 2 + :) & e ) { std::cerr << (:link + 1 + + 0 + + -23 + + + 2 + :)(e); } }@] + + + + + 0 + + -12 + + + + 25 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: T must have accessible copy constructor and must not be a reference (there is no requirement that T's copy constructor does not throw.) !!!!Description: This class template is used to associate a Tag type with a value type T. Objects of type (:link + 1 + + 0 + + -12 + + + 2 + :)<Tag,T> can be passed to (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:) to be stored in objects of type boost::(:link + 1 + + 0 + + -11 + + + 2 + :). !!!!Note: The header <(:link + 1 + + 0 + + -30 + + + 2 + :)> provides a declaration of the (:link + 1 + + 0 + + -12 + + + 2 + :) template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, like this: [@#include <(:link + 1 + + 0 + + -30 + + + 2 + :)> typedef boost::(:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_errno,int> errno_info;@] Of course, to actually add an (:link + 1 + + 0 + + -12 + + + 2 + :) object to (:link + 1 + + 0 + + -11 + + + 2 + mod="p":) using (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:), or to retrieve it using (:link + 1 + + 0 + + -15 + + + 2 + :), you must first #include <(:link + 1 + + 0 + + -33 + + + 2 + :)>. + + + + + 0 + + -16 + + + + 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 + + -11 + + + 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 + + -11 + + + 2 + :). The T sub-object is initialized from x by the T copy constructor. !!!!Throws: Nothing. + + + + + 0 + + -42 + + + + 21 + 2 + (:auto !!!:) Sometimes the throw site does not have all the information that is needed at the catch site to make sense of what went wrong. Here is an example: [@#include <stdio.h> #include <string> class file_read_error { public: explicit file_read_error( std::string const & fn ): fn_(fn) { }; std::string const & file_name() const { return fn_; } private: std::string fn_; }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error("????"); }@] We have defined an exception class file_read_error which can store a file name, so that when we catch a file_read_error object, we know which file the failure is related to. However, the file_read function does not have the file name at the time of the throw; all it has is a FILE handle. One possible solution is to not use FILE handles directly. We could have our own class file which stores both a FILE handle and a file name, and pass that to file_read. However, this could be problematic if we communicate with 3rd party code that does not use our class file (probably because they have their own similar class.) A better solution is to make class file_read_error derive (possibly indirectly) from boost::(:link + 1 + + 0 + + -11 + + + 2 + :), and free the file_read function from the burden of storing the file name in exceptions it throws: [@#include <(:link + 1 + + 0 + + -26 + + + 2 + :)> #include <stdio.h> #include <errno.h> typedef boost::(:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_errno,int> errno_info; class file_read_error: public boost::(:link + 1 + + 0 + + -11 + + + 2 + :) { }; void file_read( FILE * f, void * buffer, size_t size ) { if( size!=fread(buffer,1,size,f) ) throw file_read_error() << errno_info(errno); }@] If file_read detects a failure, it throws an exception which contains the information that is available at the time, namely the errno. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally: [@#include <(:link + 1 + + 0 + + -26 + + + 2 + :)> #include <boost/shared_ptr.hpp> #include <stdio.h> #include <string> typedef boost::(:link + 1 + + 0 + + -12 + + + 2 + :)<struct tag_file_name,std::string> file_name_info; boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode ); void file_read( FILE * f, void * buffer, size_t size ); void parse_file( char const * file_name ) { boost::shared_ptr<FILE> f = file_open(file_name,"rb"); assert(f); try { char buf[1024]; file_read( f.get(), buf, sizeof(buf) ); } catch( boost::(:link + 1 + + 0 + + -11 + + + 2 + :) & e ) { e << file_name_info(file_name); throw; } }@] The above function is (almost) exception-neutral -- if an exception is emitted by any function call within the try block, parse_file does not need to do any real work, but it intercepts any boost::(:link + 1 + + 0 + + -11 + + + 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 + + -11 + + + 2 + :) object is that the file name is relevant to any failure that occurs in parse_file, ''even if the failure is unrelated to file I/O''. As usual, the stored data can be retrieved using (:link + 1 + + 0 + + -15 + + + 2 + :). + + 0 @@ -6466,6 +6029,443 @@ 0 + + + 0 + + -13 + + + + 7 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: E must be boost::(:link + 1 + + 0 + + -11 + + + 2 + :), or a type that derives (indirectly) from boost::(:link + 1 + + 0 + + -11 + + + 2 + :). !!!!Effects: Stores a copy of v into x. If x already contains data of type (:link + 1 + + 0 + + -12 + + + 2 + :)<Tag,T>, that data is overwritten. !!!!Returns: x. (:include throws:) + + + + + 0 + + -43 + + + + 37 + 2 + (:auto !!!:) When you catch an exception, you can call (:link + 1 + + 0 + + -19 + + + 2 + :) to get an (:link + 1 + + 0 + + -17 + + + 2 + :) object: [@#include <(:link + 1 + + 0 + + -35 + + + 2 + :)> #include <boost/thread.hpp> #include <boost/bind.hpp> void do_work(); //throws cloning-enabled boost::(:link + 1 + + 0 + + -11 + + + 2 + :)s void worker_thread( boost::(:link + 1 + + 0 + + -17 + + + 2 + :) & error ) { try { do_work(); error = boost::(:link + 1 + + 0 + + -17 + + + 2 + :)(); } catch( ... ) { error = boost::(:link + 1 + + 0 + + -19 + + + 2 + :)(); } }@] In the above example, note that (:link + 1 + + 0 + + -19 + + + 2 + :) captures the original type of the exception object. The exception can be thrown again using the (:link + 1 + + 0 + + -21 + + + 2 + :) function: [@// ...continued void work() { boost::(:link + 1 + + 0 + + -17 + + + 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 + + -21 + + + 2 + :)(error); }@] Note that (:link + 1 + + 0 + + -19 + + + 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 + + -17 + + + 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 + + -17 + + + 2 + :) points to an instance of (:link + 1 + + 0 + + -22 + + + 2 + :). Regardless, the use of (:link + 1 + + 0 + + -19 + + + 2 + :) and (:link + 1 + + 0 + + -21 + + + 2 + :) in the above examples is well-formed. + + + + + 0 + + -44 + + + + 7 + 2 + (:auto !!!:) (:include decl:) !!!!Effects: * Default constructor: initializes an empty boost::(:link + 1 + + 0 + + -11 + + + 2 + :) object. * Copy constructor: initializes a boost::(:link + 1 + + 0 + + -11 + + + 2 + :) object which shares ownership with x of all data added through (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:), including data that is added at a future time. !!!!Throws: Nothing. + + + + + 0 + + -35 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -29 + + + + 1 + 2 + (:auto !!!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -25 + + + + 15 + 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. Defining either macro does not have an observable degrading effect on the library functionality, except for the following: ->By default, the + 1 + + 0 + + -15 + + + 2 + function template can be called with any exception type. If BOOST_NO_RTTI is defined, + 1 + + 0 + + -15 + + + 2 + can be used only with objects of type boost:: + 1 + + 0 + + -11 + + + 2 + . ''Note: the configuration where BOOST_NO_RTTI is defined but BOOST_NO_TYPEID is not defined is specific for MSVC compilers; it reduces RTTI overhead without fully disabling std::type_info. For most (all?) other compilers, to use Boost Exception without RTTI, both BOOST_NO_RTTI and BOOST_NO_TYPEID must be defined.'' '''BOOST_EXCEPTION_DISABLE''' By default, + 1 + + 0 + + -18 + + + 2 + and + 1 + + 0 + + -16 + + + 2 + are integrated directly in the + 1 + + 0 + + -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 + 1 + + 0 + + -36 + + + 2 + . + + + + + 0 + + -31 + + + + 1 + 2 + (:auto !!:) !!!Synopsis (:include synopsis:) + + + + + 0 + + -15 + + + + 13 + 2 + (:auto !!!:) (:include synopsis:) !!!!Requirements: * ErrorInfo must be an instance of the (:link + 1 + + 0 + + -12 + + + 2 + :) template. * E must be polymorphic. * The (:link + 1 + + 0 + + -15 + + + 2 + :) function must not be called outside of a catch block. !!!!Returns: * If dynamic_cast<boost::(:link + 1 + + 0 + + -11 + + + 2 + :) const *>(&x) is 0, or if x does not store an object of type ErrorInfo, the returned value is an empty shared_ptr. * Otherwise, the returned shared_ptr points to the stored value (use (:link + 1 + + 0 + + -13 + + + 2 + |operator<<:) to store values in exception objects.) The shared_ptr is valid even after x has been destroyed. !!!!Throws: Nothing. !!!!Note: The interface of + 1 + + 0 + + -15 + + + 2 + may be affected by the build + 1 + + 0 + + -25 + + + 2 + . + + @@ -6491,129 +6491,6 @@ 0 - - - 0 - - -6 - - - - 0 - - - - - 0 - - -7 - - - - 0 - - - - - 0 - - -8 - - - - 1 - 2 - !!!!Throws: std::bad_alloc, or any exception emitted by the T copy constructor. - - - - - 0 - - -9 - - - - 0 - - - - - 0 - - -10 - - - - 0 - - - - - 0 - - -11 - - - - 0 - - - - - 0 - - -12 - - - - 0 - - - - - 0 - - -24 - - - - 0 - - - - - 0 - - -35 - - - - 0 - - - - - 0 - - -17 - - - - 0 - - - - - 0 - - -15 - - - - 0 - - 0 @@ -6629,7 +6506,7 @@ 0 - -20 + -30 @@ -6640,7 +6517,7 @@ 0 - -13 + -19 @@ -6651,7 +6528,7 @@ 0 - -39 + -34 @@ -6662,7 +6539,7 @@ 0 - -31 + -18 @@ -6673,40 +6550,7 @@ 0 - -40 - - - - 0 - - - - - 0 - - -41 - - - - 0 - - - - - 0 - - -42 - - - - 0 - - - - - 0 - - -33 + -7 @@ -6735,28 +6579,6 @@ 0 - - - 0 - - -14 - - - - 0 - - - - - 0 - - -19 - - - - 0 - - 0 @@ -6772,86 +6594,7 @@ 0 - -22 - - - - 0 - - - - - 0 - - -43 - - - - 0 - - - - - 0 - - -16 - - - - 0 - - - - - 0 - - -32 - - - - 0 - - - - - 0 - - -18 - - - - 1 - 2 - !!!!Throws: std::bad_alloc, or any exception emitted by T1..TN copy constructor. - - - - - 0 - - -25 - - - - 0 - - - - - 0 - - -29 - - - - 0 - - - - - 0 - - -21 + -11 @@ -6873,29 +6616,7 @@ 0 - -30 - - - - 0 - - - - - 0 - - -44 - - - - 0 - - - - - 0 - - -34 + -32 @@ -6913,6 +6634,195 @@ 0 + + + 0 + + -21 + + + + 0 + + + + + 0 + + -20 + + + + 0 + + + + + 0 + + -33 + + + + 0 + + + + + 0 + + -39 + + + + 0 + + + + + 0 + + -40 + + + + 0 + + + + + 0 + + -22 + + + + 0 + + + + + 0 + + -8 + + + + 0 + + + + + 0 + + -6 + + + + 0 + + + + + 0 + + -41 + + + + 0 + + + + + 0 + + -24 + + + + 0 + + + + + 0 + + -17 + + + + 0 + + + + + 0 + + -14 + + + + 1 + 2 + !!!!Throws: std::bad_alloc, or any exception emitted by T1..TN copy constructor. + + + + + 0 + + -9 + + + + 0 + + + + + 0 + + -10 + + + + 0 + + + + + 0 + + -12 + + + + 0 + + + + + 0 + + -16 + + + + 0 + + + + + 0 + + -42 + + + + 0 + + 0 @@ -6924,6 +6834,96 @@ 0 + + + 0 + + -13 + + + + 1 + 2 + !!!!Throws: std::bad_alloc, or any exception emitted by the T copy constructor. + + + + + 0 + + -43 + + + + 0 + + + + + 0 + + -44 + + + + 0 + + + + + 0 + + -35 + + + + 0 + + + + + 0 + + -29 + + + + 0 + + + + + 0 + + -25 + + + + 0 + + + + + 0 + + -31 + + + + 0 + + + + + 0 + + -15 + + + + 0 + + @@ -6945,6 +6945,98 @@ -5 + + 0 + + + + + 0 + + -38 + + + + 0 + + + + + 0 + + -30 + + + + 1 + 2 + [@namespace boost { (:include api pre_indent="4":) }@] + + + + + 0 + + -19 + + + + 3 + 2 + `#include <(:link + 1 + + 0 + + -35 + + + 2 + :)> [@namespace boost { (:include decl pre_indent="4":) }@] + + + + + 0 + + -34 + + + + 1 + 2 + [@#include <boost/tuple/tuple.hpp> namespace boost { (:include api pre_indent="4":) }@] + + + + + 0 + + -18 + + + + 3 + 2 + `#include < + 1 + + 0 + + -28 + + + 2 + > [@namespace boost { (:include decl pre_indent="4":) }@] + + + + + 0 + + -7 + + 3 2 @@ -6964,7 +7056,7 @@ 0 - -6 + -28 @@ -6986,29 +7078,7 @@ 0 - -7 - - - - 3 - 2 - `#include < - 1 - - 0 - - -29 - - - 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -8 + -23 @@ -7019,7 +7089,7 @@ 0 - -33 + -27 2 @@ -7030,44 +7100,13 @@ 0 - -9 + -27 - 3 + 1 2 - `#include <(:link - 1 - - 0 - - -35 - - - 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -10 - - - - 3 - 2 - `#include <(:link - 1 - - 0 - - -31 - - - 2 - :)> [@namespace boost { (:include def pre_indent="4":) }@] + [@#include <exception> #include <string> namespace boost { (:include api pre_indent="4":) }@] @@ -7082,61 +7121,6 @@ 2 `#include <(:link 1 - - 0 - - -35 - - - 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -12 - - - - 0 - - - - - 0 - - -24 - - - - 3 - 2 - `#include <(:link - 1 - - 0 - - -28 - - - 2 - :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -35 - - - - 3 - 2 - [@#include <(:link - 1 0 @@ -7144,28 +7128,6 @@ 2 - :)> namespace boost { (:include api pre_indent="4":) }@] - - - - - 0 - - -17 - - - - 3 - 2 - `#include <(:link - 1 - - 0 - - -33 - - - 2 :)> [@namespace boost { (:include def pre_indent="4":) }@] @@ -7173,22 +7135,61 @@ 0 - -15 + -26 - 0 + 1 + 2 + [@(:include api:)@] 0 - -38 + -32 - 0 + 1 + 2 + [@#include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] + + + + + 0 + + -36 + + + + 1 + 2 + (:include api:) + + + + + 0 + + -21 + + + + 3 + 2 + `#include <(:link + 1 + + 0 + + -35 + + + 2 + :)> [@namespace boost { (:include decl pre_indent="4":) }@] @@ -7213,74 +7214,6 @@ :)> [@namespace boost { (:include decl pre_indent="4":) }@] - - - 0 - - -13 - - - - 0 - - - - - 0 - - -39 - - - - 0 - - - - - 0 - - -31 - - - - 1 - 2 - [@namespace boost { (:include api pre_indent="4":) }@] - - - - - 0 - - -40 - - - - 0 - - - - - 0 - - -41 - - - - 0 - - - - - 0 - - -42 - - - - 0 - - 0 @@ -7307,42 +7240,7 @@ 0 - -28 - - - - 1 - 2 - [@#include <exception> #include <string> namespace boost { (:include api pre_indent="4":) }@] - - - - - 0 - - -23 - - - - 3 - 2 - `#include <(:link - 1 - - 0 - - -35 - - - 2 - :)> [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -14 + -39 @@ -7353,35 +7251,11 @@ 0 - -19 + -40 - 3 - 2 - `#include < - 1 - - 0 - - -32 - - - 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -27 - - - - 1 - 2 - [@(:include api:)@] + 0 @@ -7410,7 +7284,7 @@ 0 - -43 + -8 @@ -7421,7 +7295,7 @@ 0 - -16 + -6 @@ -7432,20 +7306,62 @@ 0 - -32 + -41 - 1 + 0 + + + + + 0 + + -24 + + + + 3 2 - [@#include <boost/shared_ptr.hpp> namespace boost { (:include api pre_indent="4":) }@] + `#include < + 1 + + 0 + + -36 + + + 2 + > (:include decl:) 0 - -18 + -17 + + + + 3 + 2 + `#include <(:link + 1 + + 0 + + -35 + + + 2 + :)> [@namespace boost { (:include decl pre_indent="4":) }@] + + + + + 0 + + -14 @@ -7465,7 +7381,7 @@ 0 - -18 + -14 2 @@ -7476,7 +7392,51 @@ 0 - -25 + -9 + + + + 0 + + + + + 0 + + -10 + + + + 0 + + + + + 0 + + -12 + + + + 3 + 2 + `#include <(:link + 1 + + 0 + + -33 + + + 2 + :)> [@namespace boost { (:include def pre_indent="4":) }@] + + + + + 0 + + -16 @@ -7487,11 +7447,99 @@ 0 - -36 + -29 2 - > (:include decl:) + > [@namespace boost { (:include decl pre_indent="4":) }@] + + + + + 0 + + -42 + + + + 0 + + + + + 0 + + -37 + + + + 0 + + + + + 0 + + -13 + + + + 3 + 2 + `#include <(:link + 1 + + 0 + + -33 + + + 2 + :)>\\ [@namespace boost { (:include decl pre_indent="4":) }@] + + + + + 0 + + -43 + + + + 0 + + + + + 0 + + -44 + + + + 0 + + + + + 0 + + -35 + + + + 3 + 2 + [@#include <(:link + 1 + + 0 + + -31 + + + 2 + :)> namespace boost { (:include api pre_indent="4":) }@] @@ -7520,29 +7568,7 @@ 0 - -21 - - - - 3 - 2 - `#include < - 1 - - 0 - - -6 - - - 2 - > [@namespace boost { (:include decl pre_indent="4":) }@] - - - - - 0 - - -26 + -25 @@ -7553,7 +7579,7 @@ 0 - -30 + -31 @@ -7566,48 +7592,22 @@ 0 - -44 + -15 - 0 - - - - - 0 - - -34 - - - - 1 + 3 2 - [@#include <boost/tuple/tuple.hpp> namespace boost { (:include api pre_indent="4":) }@] - - - - - 0 - - -36 - - - - 1 + `#include < + 1 + + 0 + + -32 + + 2 - (:include api:) - - - - - 0 - - -37 - - - - 0 + > [@namespace boost { (:include decl pre_indent="4":) }@] @@ -7631,65 +7631,23 @@ -5 - - -6 - - - -7 - - - -8 - - - -9 - - - -10 - - - -11 - - - -12 - - - -24 - - - -35 - - - -17 - - - -15 - -38 - -20 + -30 - -13 + -19 - -39 + -34 - -31 + -18 - -40 - - - -41 - - - -42 - - - -33 + -7 -28 @@ -7697,57 +7655,99 @@ -23 - - -14 - - - -19 - -27 - -22 - - - -43 - - - -16 - - - -32 - - - -18 - - - -25 - - - -29 - - - -21 + -11 -26 - -30 - - - -44 - - - -34 + -32 -36 + + -21 + + + -20 + + + -33 + + + -39 + + + -40 + + + -22 + + + -8 + + + -6 + + + -41 + + + -24 + + + -17 + + + -14 + + + -9 + + + -10 + + + -12 + + + -16 + + + -42 + -37 + + -13 + + + -43 + + + -44 + + + -35 + + + -29 + + + -25 + + + -31 + + + -15 + @@ -7767,7 +7767,7 @@ - -12 + -5 @@ -7784,7 +7784,7 @@ - -13 + -6 @@ -7801,7 +7801,7 @@ - -14 + -8 @@ -7852,7 +7852,7 @@ - -6 + -28 @@ -7904,7 +7904,7 @@ - -10 + -11 @@ -7936,7 +7936,7 @@ - -39 + -44 @@ -7964,7 +7964,7 @@ - -42 + -39 @@ -7992,7 +7992,7 @@ - -21 + -18 @@ -8020,7 +8020,7 @@ - -7 + -16 @@ -8048,7 +8048,7 @@ - -8 + -13 @@ -8072,7 +8072,7 @@ - -41 + -43 @@ -8096,7 +8096,7 @@ - -15 + -9 @@ -8120,7 +8120,7 @@ - -25 + -24 @@ -8148,7 +8148,7 @@ - -24 + -23 @@ -8196,7 +8196,7 @@ - -16 + -10 @@ -8244,7 +8244,7 @@ - -27 + -26 @@ -8268,7 +8268,7 @@ - -28 + -27 @@ -8296,7 +8296,7 @@ - -5 + -7 @@ -8328,7 +8328,7 @@ - -26 + -25 @@ -8356,7 +8356,7 @@ - -19 + -15 @@ -8384,7 +8384,7 @@ - -17 + -12 @@ -8432,7 +8432,7 @@ - -44 + -38 @@ -8480,7 +8480,7 @@ - -38 + -42 @@ -8508,7 +8508,7 @@ - -11 + -19 @@ -8536,7 +8536,7 @@ - -20 + -17 @@ -8564,7 +8564,7 @@ - -23 + -22 @@ -8592,7 +8592,7 @@ - -22 + -21 @@ -8620,7 +8620,7 @@ - -9 + -20 @@ -8700,7 +8700,7 @@ - -18 + -14 @@ -8748,7 +8748,7 @@ - -43 + -41 @@ -8779,16 +8779,52 @@ -5 - free function + noindex 0 - -6 + -38 - exception_ptr + noalso noindex tutorial + + + + 0 + + -30 + + + + + + + 0 + + -19 + + + exception_ptr free function + + + + 0 + + -34 + + + + + + + 0 + + -18 + + + exception_ptr free function @@ -8797,58 +8833,22 @@ -7 - error_info free function + free function 0 - -8 + -28 - error_info free function + exception_ptr 0 - -9 - - - exception_ptr free function - - - - 0 - - -10 - - - type - - - - 0 - - -11 - - - exception_ptr free function - - - - 0 - - -12 - - - noindex - - - - 0 - - -24 + -23 diagnostic_information free function @@ -8857,7 +8857,133 @@ 0 - -35 + -27 + + + + + + + 0 + + -11 + + + type + + + + 0 + + -26 + + + + + + + 0 + + -32 + + + error_info + + + + 0 + + -36 + + + + + + + 0 + + -21 + + + exception_ptr free function + + + + 0 + + -20 + + + exception_ptr free function + + + + 0 + + -33 + + + + + + + 0 + + -39 + + + function + + + + 0 + + -40 + + + noalso noindex tutorial + + + + 0 + + -22 + + + exception_ptr type + + + + 0 + + -8 + + + tutorial + + + + 0 + + -6 + + + tutorial + + + + 0 + + -41 + + + noalso noindex tutorial + + + + 0 + + -24 @@ -8871,114 +8997,6 @@ type - - - 0 - - -15 - - - tutorial - - - - 0 - - -38 - - - noalso noindex tutorial - - - - 0 - - -20 - - - type - - - - 0 - - -13 - - - tutorial - - - - 0 - - -39 - - - function - - - - 0 - - -31 - - - - - - - 0 - - -40 - - - noalso noindex tutorial - - - - 0 - - -41 - - - noalso noindex tutorial - - - - 0 - - -42 - - - function - - - - 0 - - -33 - - - - - - - 0 - - -28 - - - - - - - 0 - - -23 - - - exception_ptr type - 0 @@ -8986,34 +9004,70 @@ -14 - tutorial - - - - 0 - - -19 - - error_info free function 0 - -27 + -9 - + tutorial 0 - -22 + -10 - exception_ptr free function + diagnostic_information tutorial + + + + 0 + + -12 + + + type + + + + 0 + + -16 + + + error_info free function + + + + 0 + + -42 + + + noalso noindex tutorial + + + + 0 + + -37 + + + index noindex + + + + 0 + + -13 + + + error_info free function @@ -9028,34 +9082,16 @@ 0 - -16 + -44 - diagnostic_information tutorial + function 0 - -32 - - - error_info - - - - 0 - - -18 - - - error_info free function - - - - 0 - - -25 + -35 @@ -9073,16 +9109,7 @@ 0 - -21 - - - exception_ptr free function - - - - 0 - - -30 + -31 @@ -9091,37 +9118,10 @@ 0 - -44 + -15 - noalso noindex tutorial - - - - 0 - - -34 - - - - - - - 0 - - -36 - - - - - - - 0 - - -37 - - - index noindex + error_info free function