forked from boostorg/exception
documentation update, added function exception::diagnostic_information, added std::exception to_string overload, removed tabs from source files
[SVN r46697]
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>BOOST_ERROR_INFO</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -33,9 +33,10 @@ boost
|
||||
::boost::throw_file(__FILE__) <<\
|
||||
::boost::throw_line((int)__LINE__)</span>
|
||||
}</pre>
|
||||
</div><p>This macro is designed to be used with <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> when throwing a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, to store information about the location of the throw statement. It can be chained with other <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt>s in a single throw expression.</p>
|
||||
</div><p>This macro is designed to be used with <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> when throwing a boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, to store information about the location of the throw statement. It can be chained with other <span class="RenoLink"><a href="error_info.html">error_info</a></span>s in a single throw expression.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_error_info_hpp.html">boost/exception/info.hpp<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,46 +19,49 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h2>Abstract</h2>
|
||||
<h2>Introduction</h2>
|
||||
<p>The purpose of Boost Exception is to ease the design of exception class hierarchies and to help write exception handling and error reporting code.</p>
|
||||
<p>It supports transporting of arbitrary data to the catch site, which is otherwise tricky due to the no-throw requirements (15.5.1) for exception classes. Data can be added to any exception object, either directly in the throw-expression (15.1), or at a later time as the exception object propagates up the call stack.</p>
|
||||
<p>The ability to add data to exception objects after they have been passed to <tt>throw</tt> is important, because often some of the information needed to handle an exception is unavailable in the context where the failure is detected. </p>
|
||||
<p>Boost Exception also supports <span class="RenoLink"><a href="cloning.html">cloning</a></span> of exception objects, implemented non-intrusively and automatically by the <tt>boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>()</tt> function.</p>
|
||||
<p>The ability to add data to exception objects after they have been passed to throw is important, because often some of the information needed to handle an exception is unavailable in the context where the failure is detected. </p>
|
||||
<p>Boost Exception also supports <span class="RenoLink"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">N2179</a></span>-style <span class="RenoLink"><a href="tutorial_exception_ptr.html">copying</a></span> of exception objects, implemented non-intrusively and automatically by the boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span> function.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>Boost Exception was accepted as a Boost library on November 7 2007, however it has not yet been part of an official Boost release. Current version can be downloaded from <span class="RenoLink"><a href="http://svn.boost.org/svn/boost/trunk"> Boost SVN</a></span>.</p>
|
||||
<h2>Contents</h2>
|
||||
<div><ol><li>Tutorial<div><ol><li><span class="RenoLink"><a href="transporting_data.html">Tutorial: Transporting of Arbitrary Data to the Catch Site</a></span></li>
|
||||
<li><span class="RenoLink"><a href="using_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies</a></span></li>
|
||||
<li><span class="RenoLink"><a href="cloning.html">Tutorial: Transporting of Exceptions between Threads</a></span></li>
|
||||
<li><span class="RenoLink"><a href="logging.html">Tutorial: Logging of boost::exception Objects</a></span></li>
|
||||
<div><ol><li>Tutorial<div><ol><li><span class="RenoLink"><a href="tutorial_transporting_data.html">Tutorial: Transporting of Arbitrary Data to the Catch Site</a></span></li>
|
||||
<li><span class="RenoLink"><a href="tutorial_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies</a></span></li>
|
||||
<li><span class="RenoLink"><a href="tutorial_exception_ptr.html">Tutorial: Transporting of Exceptions between Threads</a></span></li>
|
||||
<li><span class="RenoLink"><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information</a></span></li>
|
||||
</ol></div>
|
||||
</li>
|
||||
<li>Documentation<div><ol><li>Class <tt><span class="RenoLink"><a href="exception.html">exception</a></span></tt></li>
|
||||
<li>Transporting of Arbitrary Data to the Catch Site<div><ol><li><tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>()</tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>()</tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO</a></span></tt></li>
|
||||
<li>Documentation<div><ol><li>Class <span class="RenoLink"><a href="exception.html">exception</a></span></li>
|
||||
<li>Transporting of Arbitrary Data to the Catch Site<div><ol><li><span class="RenoLink"><a href="error_info.html">error_info</a></span></li>
|
||||
<li><span class="RenoLink"><a href="operator_shl_exception.html">operator<</exception</a></span></li>
|
||||
<li><span class="RenoLink"><a href="operator_shl_tuple.html">operator<</tuple</a></span></li>
|
||||
<li><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span></li>
|
||||
<li><span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span></li>
|
||||
<li><span class="RenoLink"><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO</a></span></li>
|
||||
</ol></div>
|
||||
</li>
|
||||
<li>Transporting of Exceptions between Threads<div><ol><li><tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>()</tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>()</tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></tt></li>
|
||||
<li><span class="RenoLink"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">N2179</a></span> Transporting of Exceptions between Threads<div><ol><li><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></li>
|
||||
<li><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span></li>
|
||||
<li><span class="RenoLink"><a href="current_exception.html">current_exception</a></span></li>
|
||||
<li><span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span></li>
|
||||
<li><span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span></li>
|
||||
<li><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></li>
|
||||
</ol></div>
|
||||
</li>
|
||||
<li><tt><span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>()</tt></li>
|
||||
<li>Headers<div><ol><li><tt><span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="throw_exception_hpp.html">boost/throw_exception.hpp</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></span></tt></li>
|
||||
<li><tt><span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span></tt></li>
|
||||
<li><span class="RenoLink"><a href="diagnostic_information.html">diagnostic_information</a></span></li>
|
||||
<li><span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span></li>
|
||||
<li>Headers<div><ol><li><span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span></li>
|
||||
<li><span class="RenoLink"><a href="throw_exception_hpp.html">boost/throw_exception.hpp</a></span></li>
|
||||
</ol></div>
|
||||
</li>
|
||||
</ol></div>
|
||||
@ -66,29 +69,26 @@
|
||||
<li><span class="RenoLink"><a href="name_idx.html">Index</a></span></li>
|
||||
</ol></div>
|
||||
<h2>Synopsis</h2>
|
||||
<p><tt>#include <<span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span>></tt></p>
|
||||
<p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> class
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">class
|
||||
<span class="RenoLink"><a href="exception.html">exception</a></span>
|
||||
{
|
||||
public:
|
||||
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</span>
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>() const throw();</span>
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</span>
|
||||
|
||||
protected:
|
||||
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</span>
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</span>
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</span>
|
||||
};</span></span>
|
||||
|
||||
private:
|
||||
|
||||
---unspecified---
|
||||
};</span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> template <class Tag,class T>
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">template <class Tag,class T>
|
||||
class
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span>
|
||||
{
|
||||
@ -97,29 +97,12 @@ boost
|
||||
typedef T value_type;
|
||||
|
||||
error_info( value_type const & );
|
||||
|
||||
private:
|
||||
|
||||
---unspecified---
|
||||
};</span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> template <class E, class Tag1, class T1>
|
||||
E const & operator<<( E const & x, <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1> const & v );
|
||||
|
||||
template <class E, class Tag1, class T1, ..., class TagN, class TN>
|
||||
E const & operator<<( E const & x,
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span><
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1>,
|
||||
...,
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><TagN,TN> > const & v );</span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> template <class ErrorInfo,class E>
|
||||
<span class="RenoIncludeSPAN">template <class ErrorInfo,class E>
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span><typename ErrorInfo::value_type const> <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>( E const & x );</span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> template <class T>
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>( T const & x );</span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_function,char const *> throw_function;
|
||||
<span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_function,char const *> throw_function;
|
||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_file,char const *> throw_file;
|
||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_line,int> throw_line;
|
||||
|
||||
@ -128,33 +111,55 @@ boost
|
||||
::boost::throw_file(__FILE__) <<\
|
||||
::boost::throw_line((int)__LINE__)</span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> typedef ---unspecified--- <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span>;</span>
|
||||
<span class="RenoIncludeSPAN">template <class E, class Tag, class T>
|
||||
E const & <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>( E const & x, <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T> const & v );</span></span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> template <class T>
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>( T const & e );</span>
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">template <class E, class Tag1, class T1, ..., class TagN, class TN>
|
||||
E const & <span class="RenoLink"><a href="operator_shl_tuple.html">operator<<</a></span>( E const & x,
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span><
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1>,
|
||||
...,
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><TagN,TN> > const & v );</span></span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>();</span>
|
||||
<span class="RenoIncludeSPAN"> template <class T>
|
||||
<span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>( T const & e );</span>
|
||||
<span class="RenoIncludeSPAN"> void <span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>( <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> const & ep );</span>
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">template <class T>
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>( T const & x );</span></span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> class
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">std::string <span class="RenoLink"><a href="diagnostic_information.html">diagnostic_information</a></span>( std::exception const & x );</span></span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">class
|
||||
<span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>:
|
||||
public std::exception
|
||||
public boost::exception
|
||||
public boost::<span class="RenoLink"><a href="exception.html">exception</a></span>
|
||||
{
|
||||
---unspecified---
|
||||
};</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">#ifdef BOOST_NO_EXCEPTIONS
|
||||
<span class="RenoIncludeSPAN">typedef ---unspecified--- <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span>;</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">template <class T>
|
||||
<span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>( T const & e );</span>
|
||||
|
||||
<span class="RenoIncludeSPAN"><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>();</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">void <span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>( <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> const & ep );</span></span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">template <class T>
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>( T const & e );</span></span>
|
||||
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">#ifdef BOOST_NO_EXCEPTIONS
|
||||
|
||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( std::exception const & e ); // user defined
|
||||
#else
|
||||
|
||||
#else
|
||||
|
||||
template <class E>
|
||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( E const & e );
|
||||
#endif</span>
|
||||
|
||||
#endif</span></span>
|
||||
}</pre>
|
||||
<div class="RenoIncludeDIV"><h2>exception</h2>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span>></tt></p>
|
||||
<h2>Class exception</h2>
|
||||
<div class="RenoIncludeDIV"><h3>exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -163,48 +168,53 @@ boost
|
||||
{
|
||||
public:
|
||||
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</span>
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>() const throw();</span>
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</span>
|
||||
|
||||
protected:
|
||||
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</span>
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</span>
|
||||
|
||||
private:
|
||||
|
||||
---unspecified---
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</span>
|
||||
};</span>
|
||||
}</pre>
|
||||
</div><p>Class <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> is designed to be used as a universal base for user-defined exception types.</p>
|
||||
<p>An object of any type deriving from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> can store data of arbitrary types, using the <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt> wrapper and <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt>.</p>
|
||||
<p>To retrieve data from a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object, use the <tt><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>()</tt> function template.</p>
|
||||
<div class="RenoIncludeDIV"><div class="RenoIncludeDIV"><h3>exception constructors</h3>
|
||||
<div class="RenoIncludeDIV"><pre> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</pre>
|
||||
</div><p>Class boost::<span class="RenoLink"><a href="exception.html">exception</a></span> is designed to be used as a universal base for user-defined exception types.</p>
|
||||
<p>An object of any type deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> can store data of arbitrary types, using the <span class="RenoLink"><a href="error_info.html">error_info</a></span> wrapper and <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>.</p>
|
||||
<p>To retrieve data from a boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object, use the <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span> function template.</p>
|
||||
<div class="RenoIncludeDIV"><h3>exception::exception</h3>
|
||||
<div class="RenoIncludeDIV"><pre><span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</pre>
|
||||
</div><h4>Effects:</h4>
|
||||
<div><ul><li> Default constructor: initializes an empty <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object.</li>
|
||||
<li> Copy constructor: initializes a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object which shares with <tt>x</tt> all data added through <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt>, including data that is added at a future time.</li>
|
||||
<div><ul><li> Default constructor: initializes an empty boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object.</li>
|
||||
<li> Copy constructor: initializes a boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object which shares with x all data added through <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>, including data that is added at a future time.</li>
|
||||
</ul></div>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception destructor</h3>
|
||||
<div class="RenoIncludeDIV"><pre> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</pre>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception::~exception</h3>
|
||||
<div class="RenoIncludeDIV"><pre><span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</pre>
|
||||
</div><h4>Effects:</h4>
|
||||
<p>Frees all resources associated with a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object.</p>
|
||||
<p>Frees all resources associated with a boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception::what()</h3>
|
||||
<div class="RenoIncludeDIV"><pre> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</pre>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception::diagnostic_information</h3>
|
||||
<div class="RenoIncludeDIV"><pre>virtual char const * <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>() const throw();</pre>
|
||||
</div><h4>Returns:</h4>
|
||||
<p>An string representation of all data stored in the <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object by the <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> function. See "<span class="RenoLink"><a href="logging.html">Tutorial: Logging of boost::exception Objects</a></span>" for details.</p>
|
||||
<p>An string representation of all data stored in the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object by the <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> function. See "<span class="RenoLink"><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information</a></span>" for details.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>The return value remains valid until the exception object from which it is obtained is destroyed or modified.</p>
|
||||
</div></div></div><h2>Transporting of Arbitrary Data to the Catch Site</h2>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception::what</h3>
|
||||
<div class="RenoIncludeDIV"><pre>virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</pre>
|
||||
</div><h4>Returns:</h4>
|
||||
<p>The default implementation is equivalent to return <span class="RenoLink"><a href="exception_diagnostic_information.html">exception::diagnostic_information</a></span>(). The signature of boost::<span class="RenoLink"><a href="exception_what.html">exception::what</a></span> is identical to the familiar std::exception::what function, so that when an exception type that derives both std::exception and boost::<span class="RenoLink"><a href="exception.html">exception</a></span> overrides the what function, it overrides both std::exception::what and boost::<span class="RenoLink"><a href="exception_what.html">exception::what</a></span>.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>The return value remains valid until the exception object from which it is obtained is destroyed or modified.</p>
|
||||
</div></div><h2>Transporting of Arbitrary Data to the Catch Site</h2>
|
||||
<div class="RenoIncludeDIV"><h3>error_info</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -217,49 +227,36 @@ boost
|
||||
typedef T value_type;
|
||||
|
||||
error_info( value_type const & );
|
||||
|
||||
private:
|
||||
|
||||
---unspecified---
|
||||
};</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>T</tt> must have accessible copy constructor and must not be a reference.</p>
|
||||
<p>T must have accessible copy constructor and must not be a reference.</p>
|
||||
<h4>Description:</h4>
|
||||
<p>This class template is used to associate a <tt>Tag</tt> type with a value type <tt>T</tt>. Objects of type <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T></tt> can be passed to <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> to be stored in objects of type <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>.</p>
|
||||
<p>This class template is used to associate a Tag type with a value type T. Objects of type <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T> can be passed to <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> to be stored in objects of type boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>The header <tt><<span class="RenoLink"><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></span>></tt> provides a declaration of the <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt> template, which is sufficient for the purpose of <tt>typedef</tt>ing an instance for specific <tt>Tag</tt> and <tt>T</tt>, like this:</p>
|
||||
<p>The header <<span class="RenoLink"><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></span>> provides a declaration of the <span class="RenoLink"><a href="error_info.html">error_info</a></span> template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, like this:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||
|
||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_errno,int> errno_info;</pre>
|
||||
<p>Of course, to actually add an <tt>errno_info</tt> object to exceptions using <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt>, or to retrieve it using <tt><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>()</tt>, you must first <tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt>.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>operator<<()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt><span class="RenoBR"> </span><br/><tt>#include <<span class="RenoLink"><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp</a></span>></tt></p>
|
||||
<p>Of course, to actually add an errno_info object to exceptions using <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>, or to retrieve it using <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>, you must first #include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>>.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>operator<<, error_info overload</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>><span class="RenoBR"> </span><br/></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> template <class E, class Tag1, class T1>
|
||||
E const & operator<<( E const & x, <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1> const & v );
|
||||
|
||||
template <class E, class Tag1, class T1, ..., class TagN, class TN>
|
||||
E const & operator<<( E const & x,
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span><
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1>,
|
||||
...,
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><TagN,TN> > const & v );</span>
|
||||
<span class="RenoIncludeSPAN"> template <class E, class Tag, class T>
|
||||
E const & <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>( E const & x, <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T> const & v );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>E</tt> must be <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, or a type that derives (indirectly) from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>.</p>
|
||||
<p>E must be boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, or a type that derives (indirectly) from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
<h4>Effects:</h4>
|
||||
<div><ul><li> The first overload stores a copy of <tt>v</tt> into <tt>x</tt>. If <tt>x</tt> already contains data of type <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1></tt>, that data is overwritten.</li>
|
||||
<li> The <tt>boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span></tt> overload is equivalent to <tt>x << v.<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements">get</a></span><0>() << ... << v.<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements">get</a></span><N>()</tt>.</li>
|
||||
</ul></div>
|
||||
<p>Stores a copy of v into x. If x already contains data of type <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1>, that data is overwritten.</p>
|
||||
<h4>Returns:</h4>
|
||||
<p><tt>x</tt>.</p>
|
||||
<p>x.</p>
|
||||
<div class="RenoIncludeDIV"><h4>Throws:</h4>
|
||||
<p><tt>std::bad_alloc</tt>, or any exception emitted by <tt>T1..TN</tt> copy constructor.</p>
|
||||
</div></div><div class="RenoIncludeDIV"><h3>get_error_info()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt></p>
|
||||
<p>std::bad_alloc, or any exception emitted by the T copy constructor.</p>
|
||||
</div></div><div class="RenoIncludeDIV"><h3>get_error_info</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -267,13 +264,13 @@ boost
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span><typename ErrorInfo::value_type const> <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>( E const & x );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p>The type of the <tt>x</tt> object must derive from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>; <tt>ErrorInfo</tt> must be an instance of the <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt> template.</p>
|
||||
<p>The type of the x object must derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>; ErrorInfo must be an instance of the <span class="RenoLink"><a href="error_info.html">error_info</a></span> template.</p>
|
||||
<h4>Returns:</h4>
|
||||
<p>If <tt>x</tt> does not store an object of type <tt>ErrorInfo</tt>, returns an empty <tt><span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span></tt>; otherwise returns pointer to the stored value. Use <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> to store values in exception objects.</p>
|
||||
<p>If x does not store an object of type ErrorInfo, returns an empty <span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span>; otherwise returns pointer to the stored value. Use <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> to store values in exception objects.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>enable_error_info()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></span>></tt></p>
|
||||
</div><div class="RenoIncludeDIV"><h3>enable_error_info</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -281,13 +278,13 @@ boost
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>( T const & x );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>T</tt> must be a user-defined type with accessible no-throw copy constructor.</p>
|
||||
<p>T must be a user-defined type with accessible no-throw copy constructor.</p>
|
||||
<h4>Returns:</h4>
|
||||
<p>An object of unspecified type with no-throw copy semantics, which derives publicly from both <tt>T</tt>, and class <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>. The <tt>T</tt> sub-object is initialized from <tt>x</tt> by the <tt>T</tt> copy constructor. If <tt>T</tt> already derives from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, then the type of the returned object does not derive <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>.</p>
|
||||
<p>An object of unspecified type with no-throw copy semantics, which derives publicly from both T, and class boost::<span class="RenoLink"><a href="exception.html">exception</a></span>. The T sub-object is initialized from x by the T copy constructor. If T already derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, then the type of the returned object does not derive boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>BOOST_ERROR_INFO</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -300,22 +297,22 @@ boost
|
||||
::boost::throw_file(__FILE__) <<\
|
||||
::boost::throw_line((int)__LINE__)</span>
|
||||
}</pre>
|
||||
</div><p>This macro is designed to be used with <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> when throwing a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, to store information about the location of the throw statement. It can be chained with other <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt>s in a single throw expression.</p>
|
||||
</div><p>This macro is designed to be used with <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> when throwing a boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, to store information about the location of the throw statement. It can be chained with other <span class="RenoLink"><a href="error_info.html">error_info</a></span>s in a single throw expression.</p>
|
||||
</div><h2>Transporting of Exceptions between Threads</h2>
|
||||
<div class="RenoIncludeDIV"><h3>exception_ptr</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> typedef ---unspecified--- <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span>;</span>
|
||||
}</pre>
|
||||
</div><p>The <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt>'s operations do not throw.</p>
|
||||
<p>Two instances of <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> are equivalent and compare equal if and only if they refer to the same exception.</p>
|
||||
<p>The default constructor of <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> produces the null value of the type. The null value is equivalent only to itself.</p>
|
||||
</div><p>The <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span>'s operations do not throw.</p>
|
||||
<p>Two instances of <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> are equivalent and compare equal if and only if they refer to the same exception.</p>
|
||||
<p>The default constructor of <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> produces the null value of the type. The null value is equivalent only to itself.</p>
|
||||
<h4>Note:</h4>
|
||||
<p><tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> objects are returned by <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> and <tt><span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>()</tt>.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>enable_current_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></span>></tt></p>
|
||||
<p> <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> objects are returned by <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> and <span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>enable_current_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -323,11 +320,11 @@ boost
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>( T const & e );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>T</tt> must have an accessible no-throw copy constructor</p>
|
||||
<p>T must have an accessible no-throw copy constructor</p>
|
||||
<h4>Returns:</h4>
|
||||
<p>An object of <i>unspecified</i> type which derives publicly from <tt>T</tt>. That is, the returned object can be intercepted by a <tt>catch(T &)</tt>.</p>
|
||||
<p>An object of <i>unspecified</i> type which derives publicly from T. That is, the returned object can be intercepted by a catch(T &).</p>
|
||||
<h4>Description:</h4>
|
||||
<p>This function is designed to be used directly in a throw-expression to enable the cloning support in Boost Exception. For example:</p>
|
||||
<p>This function is designed to be used directly in a throw-expression to enable the exception_ptr support in Boost Exception. For example:</p>
|
||||
<pre>class
|
||||
my_exception:
|
||||
public std::exception
|
||||
@ -336,28 +333,30 @@ my_exception:
|
||||
|
||||
....
|
||||
throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(my_exception());</pre>
|
||||
<p>Unless <tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt> is called at the time an exception object is used in a throw-expression, an attempt to copy it using <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> may return an <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> which refers to an instance of <tt><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></tt>. See <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> for details.</p>
|
||||
<p>Unless <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> is called at the time an exception object is used in a throw-expression, an attempt to copy it using <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> may return an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> which refers to an instance of <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>. See <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> for details.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>Instead of using the <tt>throw</tt> keyword directly, it is preferable to call <tt>boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>()</tt>. This is guaranteed to throw an exception that derives from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> and supports cloning.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>current_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<p>Instead of using the throw keyword directly, it is preferable to call boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>. This is guaranteed to throw an exception that derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> and supports exception_ptr functionality.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>current_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>();</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p>The <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> function must not be called outside of a <tt>catch</tt> block.</p>
|
||||
<p>The <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> function must not be called outside of a catch block.</p>
|
||||
<h4>Returns:</h4>
|
||||
<div><ul><li> An <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> that refers to the currently handled exception or a copy of the currently handled exception.</li>
|
||||
<li> If the function needs to allocate memory and the attempt fails, it returns an <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> that refers to an instance of <tt>std::bad_alloc</tt>.</li>
|
||||
<div><ul><li> An <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> that refers to the currently handled exception or a copy of the currently handled exception.</li>
|
||||
<li> If the function needs to allocate memory and the attempt fails, it returns an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> that refers to an instance of std::bad_alloc.</li>
|
||||
</ul></div>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
<h4>Notes:</h4>
|
||||
<div><ul><li> It is unspecified whether the return values of two successive calls to <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> refer to the same exception object.</li>
|
||||
<li> Correct implementation of <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> may require compiler support, unless <tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt> is used at the time the currently handled exception object was passed to <tt>throw</tt>. If <tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt> is not used, and if the compiler does not provide the necessary support, then <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> may return an <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> that refers to an instance of <tt><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></tt>. In this case, if the original exception object derives from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, then the <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> sub-object of the <tt><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></tt> object is initialized by the <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> copy constructor.</li>
|
||||
<div><ul><li> It is unspecified whether the return values of two successive calls to <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> refer to the same exception object.</li>
|
||||
<li> Correct implementation of <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> may require compiler support, unless <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> is used at the time the currently handled exception object was passed to throw. If <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> is not used, and if the compiler does not provide the necessary support, then <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> may return an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> that refers to an instance of <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>. In this case, if the original exception object derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, then the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> sub-object of the <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span> object is initialized by the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> copy constructor.</li>
|
||||
</ul></div>
|
||||
</div><div class="RenoIncludeDIV"><h3>copy_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
</div><div class="RenoIncludeDIV"><h3>copy_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -365,50 +364,64 @@ boost
|
||||
<span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>( T const & e );</span>
|
||||
}</pre>
|
||||
</div><h4>Effects:</h4>
|
||||
<p>As if <tt>try { throw e; } catch( ... ) { return <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>(); }</tt></p>
|
||||
</div><div class="RenoIncludeDIV"><h3>rethrow_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<p>As if try { throw e; } catch( ... ) { return <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>(); }</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>rethrow_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> void <span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>( <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> const & ep );</span>
|
||||
}</pre>
|
||||
</div><h4>Precondition:</h4>
|
||||
<p><tt>ep</tt> shall not be null.</p>
|
||||
<p>ep shall not be null.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>The exception to which <tt>ep</tt> refers.</p>
|
||||
<p>The exception to which ep refers.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>unknown_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> class
|
||||
<span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>:
|
||||
public std::exception
|
||||
public boost::exception
|
||||
public boost::<span class="RenoLink"><a href="exception.html">exception</a></span>
|
||||
{
|
||||
---unspecified---
|
||||
};</span>
|
||||
}</pre>
|
||||
</div><p>This type is used by the <span class="RenoLink"><a href="cloning.html">cloning</a></span> support in Boost Exception. Please see <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt>.</p>
|
||||
</div><h2>Throwing Exceptions</h2>
|
||||
<div class="RenoIncludeDIV"><h3>throw_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="throw_exception_hpp.html">boost/throw_exception.hpp</a></span>></tt></p>
|
||||
</div><p>This type is used by the <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> support in Boost Exception. Please see <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>.</p>
|
||||
</div><h2>Printing Diagnostic Information</h2>
|
||||
<div class="RenoIncludeDIV"><h3>diagnostic_information</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN">#ifdef BOOST_NO_EXCEPTIONS
|
||||
<span class="RenoIncludeSPAN"> std::string <span class="RenoLink"><a href="diagnostic_information.html">diagnostic_information</a></span>( std::exception const & x );</span>
|
||||
}</pre>
|
||||
</div><h4>Returns:</h4>
|
||||
<p>If dynamic_cast<boost::<span class="RenoLink"><a href="exception.html">exception</a></span> *>(&x) is not null, the returned string is initialized by a call to <span class="RenoLink"><a href="exception_diagnostic_information.html">exception::diagnostic_information</a></span>; otherwise, the returned string combines the output of x.what() and typeid(x).name().</p>
|
||||
</div><h2>Throwing Exceptions</h2>
|
||||
<div class="RenoIncludeDIV"><h3>throw_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="throw_exception_hpp.html">boost/throw_exception.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> #ifdef BOOST_NO_EXCEPTIONS
|
||||
|
||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( std::exception const & e ); // user defined
|
||||
#else
|
||||
|
||||
#else
|
||||
|
||||
template <class E>
|
||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( E const & e );
|
||||
#endif</span>
|
||||
|
||||
#endif</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>E</tt> must derive publicly from <tt>std::exception</tt>.</p>
|
||||
<p>E must derive publicly from std::exception.</p>
|
||||
<h4>Effects:</h4>
|
||||
<div><ul><li> If <tt>BOOST_NO_EXCEPTIONS</tt> is not defined, <tt>boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>(e)</tt> is equivalent to <tt>throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(boost::<span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>(e))</tt>, unless <tt>BOOST_EXCEPTION_DISABLE</tt> is defined, in which case <tt>boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>(e)</tt> is equivalent to <tt>throw e;</tt></li>
|
||||
<li> If <tt>BOOST_NO_EXCEPTIONS</tt> is defined, the function is left undefined, and the user is expected to supply an appropriate definition. Callers of <tt>throw_exception</tt> are allowed to assume that the function never returns; therefore, if the user-defined <tt>throw_exception</tt> returns, the behavior is undefined.</li>
|
||||
<div><ul><li> If BOOST_NO_EXCEPTIONS is not defined, boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>(e) is equivalent to throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(boost::<span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>(e) is equivalent to throw e;</li>
|
||||
<li> If BOOST_NO_EXCEPTIONS is defined, the function is left undefined, and the user is expected to supply an appropriate definition. Callers of throw_exception are allowed to assume that the function never returns; therefore, if the user-defined throw_exception returns, the behavior is undefined.</li>
|
||||
</ul></div>
|
||||
</div><!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
53
doc/boost_exception_diagnostic_information_hpp.html
Normal file
53
doc/boost_exception_diagnostic_information_hpp.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||
<title>boost/exception/diagnostic_information.hpp</title>
|
||||
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="body-0">
|
||||
<div class="body-1">
|
||||
<div class="body-2">
|
||||
<div>
|
||||
<div id="boost_logo">
|
||||
<a href="http://www.boost.org"><img style="border:0" src="http://www.boost.org/boost.png" alt="Boost" width="277" height="86"/></a>
|
||||
</div>
|
||||
<h1>Boost Exception</h1>
|
||||
</div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception/diagnostic_information.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>#include <exception>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">std::string <span class="RenoLink"><a href="diagnostic_information.html">diagnostic_information</a></span>( std::exception const & x );</span></span>
|
||||
}</pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_hpp.html">boost/exception.hpp<br/>
|
||||
</a><a href="diagnostic_information.html">diagnostic_information<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div id="footer">
|
||||
<p> </p>
|
||||
<hr/>
|
||||
<p>
|
||||
<a class="logo" href="http://jigsaw.w3.org/css-validator/validator?uri=http://revergestudios.com/boost-exception/reno.css"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||
<small>Copyright (c) 2006-2008 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -19,8 +19,8 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>copy_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>copy_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -28,9 +28,10 @@ boost
|
||||
<span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>( T const & e );</span>
|
||||
}</pre>
|
||||
</div><h4>Effects:</h4>
|
||||
<p>As if <tt>try { throw e; } catch( ... ) { return <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>(); }</tt></p>
|
||||
<p>As if try { throw e; } catch( ... ) { return <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>(); }</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp<br/>
|
||||
</a><a href="exception_ptr.html">exception_ptr<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
|
@ -19,25 +19,28 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>current_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>current_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>();</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p>The <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> function must not be called outside of a <tt>catch</tt> block.</p>
|
||||
<p>The <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> function must not be called outside of a catch block.</p>
|
||||
<h4>Returns:</h4>
|
||||
<div><ul><li> An <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> that refers to the currently handled exception or a copy of the currently handled exception.</li>
|
||||
<li> If the function needs to allocate memory and the attempt fails, it returns an <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> that refers to an instance of <tt>std::bad_alloc</tt>.</li>
|
||||
<div><ul><li> An <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> that refers to the currently handled exception or a copy of the currently handled exception.</li>
|
||||
<li> If the function needs to allocate memory and the attempt fails, it returns an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> that refers to an instance of std::bad_alloc.</li>
|
||||
</ul></div>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
<h4>Notes:</h4>
|
||||
<div><ul><li> It is unspecified whether the return values of two successive calls to <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> refer to the same exception object.</li>
|
||||
<li> Correct implementation of <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> may require compiler support, unless <tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt> is used at the time the currently handled exception object was passed to <tt>throw</tt>. If <tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt> is not used, and if the compiler does not provide the necessary support, then <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> may return an <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> that refers to an instance of <tt><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></tt>. In this case, if the original exception object derives from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, then the <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> sub-object of the <tt><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></tt> object is initialized by the <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> copy constructor.</li>
|
||||
<div><ul><li> It is unspecified whether the return values of two successive calls to <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> refer to the same exception object.</li>
|
||||
<li> Correct implementation of <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> may require compiler support, unless <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> is used at the time the currently handled exception object was passed to throw. If <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> is not used, and if the compiler does not provide the necessary support, then <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> may return an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> that refers to an instance of <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>. In this case, if the original exception object derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, then the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> sub-object of the <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span> object is initialized by the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> copy constructor.</li>
|
||||
</ul></div>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp<br/>
|
||||
</a><a href="copy_exception.html">copy_exception<br/>
|
||||
</a><a href="enable_current_exception.html">enable_current_exception<br/>
|
||||
</a><a href="exception_ptr.html">exception_ptr<br/>
|
||||
|
52
doc/diagnostic_information.html
Normal file
52
doc/diagnostic_information.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||
<title>diagnostic_information</title>
|
||||
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="body-0">
|
||||
<div class="body-1">
|
||||
<div class="body-2">
|
||||
<div>
|
||||
<div id="boost_logo">
|
||||
<a href="http://www.boost.org"><img style="border:0" src="http://www.boost.org/boost.png" alt="Boost" width="277" height="86"/></a>
|
||||
</div>
|
||||
<h1>Boost Exception</h1>
|
||||
</div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>diagnostic_information</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> std::string <span class="RenoLink"><a href="diagnostic_information.html">diagnostic_information</a></span>( std::exception const & x );</span>
|
||||
}</pre>
|
||||
</div><h4>Returns:</h4>
|
||||
<p>If dynamic_cast<boost::<span class="RenoLink"><a href="exception.html">exception</a></span> *>(&x) is not null, the returned string is initialized by a call to <span class="RenoLink"><a href="exception_diagnostic_information.html">exception::diagnostic_information</a></span>; otherwise, the returned string combines the output of x.what() and typeid(x).name().</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div id="footer">
|
||||
<p> </p>
|
||||
<hr/>
|
||||
<p>
|
||||
<a class="logo" href="http://jigsaw.w3.org/css-validator/validator?uri=http://revergestudios.com/boost-exception/reno.css"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||
<small>Copyright (c) 2006-2008 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -19,8 +19,8 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>enable_current_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>enable_current_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -28,11 +28,11 @@ boost
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>( T const & e );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>T</tt> must have an accessible no-throw copy constructor</p>
|
||||
<p>T must have an accessible no-throw copy constructor</p>
|
||||
<h4>Returns:</h4>
|
||||
<p>An object of <i>unspecified</i> type which derives publicly from <tt>T</tt>. That is, the returned object can be intercepted by a <tt>catch(T &)</tt>.</p>
|
||||
<p>An object of <i>unspecified</i> type which derives publicly from T. That is, the returned object can be intercepted by a catch(T &).</p>
|
||||
<h4>Description:</h4>
|
||||
<p>This function is designed to be used directly in a throw-expression to enable the cloning support in Boost Exception. For example:</p>
|
||||
<p>This function is designed to be used directly in a throw-expression to enable the exception_ptr support in Boost Exception. For example:</p>
|
||||
<pre>class
|
||||
my_exception:
|
||||
public std::exception
|
||||
@ -41,13 +41,14 @@ my_exception:
|
||||
|
||||
....
|
||||
throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(my_exception());</pre>
|
||||
<p>Unless <tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt> is called at the time an exception object is used in a throw-expression, an attempt to copy it using <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> may return an <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> which refers to an instance of <tt><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></tt>. See <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> for details.</p>
|
||||
<p>Unless <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> is called at the time an exception object is used in a throw-expression, an attempt to copy it using <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> may return an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> which refers to an instance of <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>. See <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> for details.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>Instead of using the <tt>throw</tt> keyword directly, it is preferable to call <tt>boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>()</tt>. This is guaranteed to throw an exception that derives from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> and supports cloning.</p>
|
||||
<p>Instead of using the throw keyword directly, it is preferable to call boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>. This is guaranteed to throw an exception that derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> and supports exception_ptr functionality.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp<br/>
|
||||
</a><a href="current_exception.html">current_exception<br/>
|
||||
</a><a href="cloning.html">Tutorial: Transporting of Exceptions between Threads<br/>
|
||||
</a><a href="tutorial_exception_ptr.html">Tutorial: Transporting of Exceptions between Threads<br/>
|
||||
</a><a href="throw_exception.html">throw_exception<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
|
@ -19,8 +19,8 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>enable_error_info()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>enable_error_info</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -28,14 +28,15 @@ boost
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>( T const & x );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>T</tt> must be a user-defined type with accessible no-throw copy constructor.</p>
|
||||
<p>T must be a user-defined type with accessible no-throw copy constructor.</p>
|
||||
<h4>Returns:</h4>
|
||||
<p>An object of unspecified type with no-throw copy semantics, which derives publicly from both <tt>T</tt>, and class <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>. The <tt>T</tt> sub-object is initialized from <tt>x</tt> by the <tt>T</tt> copy constructor. If <tt>T</tt> already derives from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, then the type of the returned object does not derive <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>.</p>
|
||||
<p>An object of unspecified type with no-throw copy semantics, which derives publicly from both T, and class boost::<span class="RenoLink"><a href="exception.html">exception</a></span>. The T sub-object is initialized from x by the T copy constructor. If T already derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, then the type of the returned object does not derive boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="using_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp<br/>
|
||||
</a><a href="tutorial_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a><a href="throw_exception.html">throw_exception<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
|
@ -20,7 +20,7 @@
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>error_info</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -33,31 +33,29 @@ boost
|
||||
typedef T value_type;
|
||||
|
||||
error_info( value_type const & );
|
||||
|
||||
private:
|
||||
|
||||
---unspecified---
|
||||
};</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>T</tt> must have accessible copy constructor and must not be a reference.</p>
|
||||
<p>T must have accessible copy constructor and must not be a reference.</p>
|
||||
<h4>Description:</h4>
|
||||
<p>This class template is used to associate a <tt>Tag</tt> type with a value type <tt>T</tt>. Objects of type <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T></tt> can be passed to <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> to be stored in objects of type <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>.</p>
|
||||
<p>This class template is used to associate a Tag type with a value type T. Objects of type <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T> can be passed to <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> to be stored in objects of type boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>The header <tt><<span class="RenoLink"><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></span>></tt> provides a declaration of the <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt> template, which is sufficient for the purpose of <tt>typedef</tt>ing an instance for specific <tt>Tag</tt> and <tt>T</tt>, like this:</p>
|
||||
<p>The header <<span class="RenoLink"><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></span>> provides a declaration of the <span class="RenoLink"><a href="error_info.html">error_info</a></span> template, which is sufficient for the purpose of typedefing an instance for specific Tag and T, like this:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||
|
||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_errno,int> errno_info;</pre>
|
||||
<p>Of course, to actually add an <tt>errno_info</tt> object to exceptions using <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt>, or to retrieve it using <tt><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>()</tt>, you must first <tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt>.</p>
|
||||
<p>Of course, to actually add an errno_info object to exceptions using <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>, or to retrieve it using <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>, you must first #include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>>.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO<br/>
|
||||
</a><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp<br/>
|
||||
</a><a href="exception_error_info_hpp.html">boost/exception/info.hpp<br/>
|
||||
</a><a href="exception.html">exception<br/>
|
||||
</a><a href="get_error_info.html">get_error_info<br/>
|
||||
</a><a href="operator_shl_exception.html">operator<</exception<br/>
|
||||
</a><a href="using_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a><a href="logging.html">Tutorial: Logging of boost::exception Objects<br/>
|
||||
</a><a href="operator_shl_tuple.html">operator<</tuple<br/>
|
||||
</a><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information<br/>
|
||||
</a><a href="tutorial_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,8 +19,8 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h2>exception</h2>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -29,58 +29,66 @@ boost
|
||||
{
|
||||
public:
|
||||
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</span>
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>() const throw();</span>
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</span>
|
||||
|
||||
protected:
|
||||
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</span>
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</span>
|
||||
|
||||
private:
|
||||
|
||||
---unspecified---
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</span>
|
||||
};</span>
|
||||
}</pre>
|
||||
</div><p>Class <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> is designed to be used as a universal base for user-defined exception types.</p>
|
||||
<p>An object of any type deriving from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> can store data of arbitrary types, using the <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt> wrapper and <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt>.</p>
|
||||
<p>To retrieve data from a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object, use the <tt><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>()</tt> function template.</p>
|
||||
<div class="RenoIncludeDIV"><div class="RenoIncludeDIV"><h3>exception constructors</h3>
|
||||
<div class="RenoIncludeDIV"><pre> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</pre>
|
||||
</div><p>Class boost::<span class="RenoLink"><a href="exception.html">exception</a></span> is designed to be used as a universal base for user-defined exception types.</p>
|
||||
<p>An object of any type deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> can store data of arbitrary types, using the <span class="RenoLink"><a href="error_info.html">error_info</a></span> wrapper and <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>.</p>
|
||||
<p>To retrieve data from a boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object, use the <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span> function template.</p>
|
||||
<div class="RenoIncludeDIV"><h3>exception::exception</h3>
|
||||
<div class="RenoIncludeDIV"><pre><span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</pre>
|
||||
</div><h4>Effects:</h4>
|
||||
<div><ul><li> Default constructor: initializes an empty <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object.</li>
|
||||
<li> Copy constructor: initializes a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object which shares with <tt>x</tt> all data added through <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt>, including data that is added at a future time.</li>
|
||||
<div><ul><li> Default constructor: initializes an empty boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object.</li>
|
||||
<li> Copy constructor: initializes a boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object which shares with x all data added through <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>, including data that is added at a future time.</li>
|
||||
</ul></div>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception destructor</h3>
|
||||
<div class="RenoIncludeDIV"><pre> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</pre>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception::~exception</h3>
|
||||
<div class="RenoIncludeDIV"><pre><span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</pre>
|
||||
</div><h4>Effects:</h4>
|
||||
<p>Frees all resources associated with a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object.</p>
|
||||
<p>Frees all resources associated with a boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception::what()</h3>
|
||||
<div class="RenoIncludeDIV"><pre> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</pre>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception::diagnostic_information</h3>
|
||||
<div class="RenoIncludeDIV"><pre>virtual char const * <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>() const throw();</pre>
|
||||
</div><h4>Returns:</h4>
|
||||
<p>An string representation of all data stored in the <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object by the <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> function. See "<span class="RenoLink"><a href="logging.html">Tutorial: Logging of boost::exception Objects</a></span>" for details.</p>
|
||||
<p>An string representation of all data stored in the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object by the <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> function. See "<span class="RenoLink"><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information</a></span>" for details.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>The return value remains valid until the exception object from which it is obtained is destroyed or modified.</p>
|
||||
</div></div></div><h3>See also:</h3>
|
||||
</div><div class="RenoIncludeDIV"><h3>exception::what</h3>
|
||||
<div class="RenoIncludeDIV"><pre>virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</pre>
|
||||
</div><h4>Returns:</h4>
|
||||
<p>The default implementation is equivalent to return <span class="RenoLink"><a href="exception_diagnostic_information.html">exception::diagnostic_information</a></span>(). The signature of boost::<span class="RenoLink"><a href="exception_what.html">exception::what</a></span> is identical to the familiar std::exception::what function, so that when an exception type that derives both std::exception and boost::<span class="RenoLink"><a href="exception.html">exception</a></span> overrides the what function, it overrides both std::exception::what and boost::<span class="RenoLink"><a href="exception_what.html">exception::what</a></span>.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>The return value remains valid until the exception object from which it is obtained is destroyed or modified.</p>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO<br/>
|
||||
</a><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="current_exception.html">current_exception<br/>
|
||||
</a><a href="diagnostic_information.html">diagnostic_information<br/>
|
||||
</a><a href="enable_current_exception.html">enable_current_exception<br/>
|
||||
</a><a href="enable_error_info.html">enable_error_info<br/>
|
||||
</a><a href="error_info.html">error_info<br/>
|
||||
</a><a href="get_error_info.html">get_error_info<br/>
|
||||
</a><a href="operator_shl_exception.html">operator<</exception<br/>
|
||||
</a><a href="using_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a><a href="logging.html">Tutorial: Logging of boost::exception Objects<br/>
|
||||
</a><a href="transporting_data.html">Tutorial: Transporting of Arbitrary Data to the Catch Site<br/>
|
||||
</a><a href="cloning.html">Tutorial: Transporting of Exceptions between Threads<br/>
|
||||
</a><a href="operator_shl_tuple.html">operator<</tuple<br/>
|
||||
</a><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information<br/>
|
||||
</a><a href="tutorial_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a><a href="tutorial_transporting_data.html">Tutorial: Transporting of Arbitrary Data to the Catch Site<br/>
|
||||
</a><a href="tutorial_exception_ptr.html">Tutorial: Transporting of Exceptions between Threads<br/>
|
||||
</a><a href="unknown_exception.html">unknown_exception<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,9 +19,34 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception_ptr.hpp</h3>
|
||||
<p>This header file contains the following definitions/declarations:</p>
|
||||
<div class="RenoPageList"><a href="copy_exception.html">copy_exception<br/>
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception_ptr.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span>>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">class
|
||||
<span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>:
|
||||
public std::exception
|
||||
public boost::<span class="RenoLink"><a href="exception.html">exception</a></span>
|
||||
{
|
||||
---unspecified---
|
||||
};</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">typedef ---unspecified--- <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span>;</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">template <class T>
|
||||
<span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>( T const & e );</span>
|
||||
|
||||
<span class="RenoIncludeSPAN"><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>();</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">void <span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>( <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> const & ep );</span></span>
|
||||
}</pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_hpp.html">boost/exception.hpp<br/>
|
||||
</a><a href="copy_exception.html">copy_exception<br/>
|
||||
</a><a href="current_exception.html">current_exception<br/>
|
||||
</a><a href="exception_ptr.html">exception_ptr<br/>
|
||||
</a><a href="rethrow_exception.html">rethrow_exception<br/>
|
||||
|
@ -19,12 +19,12 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>exception constructors</h3>
|
||||
<div class="RenoIncludeDIV"><pre> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</pre>
|
||||
<div class="RenoIncludeDIV"><h3>exception::exception</h3>
|
||||
<div class="RenoIncludeDIV"><pre><span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</pre>
|
||||
</div><h4>Effects:</h4>
|
||||
<div><ul><li> Default constructor: initializes an empty <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object.</li>
|
||||
<li> Copy constructor: initializes a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object which shares with <tt>x</tt> all data added through <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt>, including data that is added at a future time.</li>
|
||||
<div><ul><li> Default constructor: initializes an empty boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object.</li>
|
||||
<li> Copy constructor: initializes a boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object which shares with x all data added through <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>, including data that is added at a future time.</li>
|
||||
</ul></div>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
|
@ -19,10 +19,10 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>exception destructor</h3>
|
||||
<div class="RenoIncludeDIV"><pre> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</pre>
|
||||
<div class="RenoIncludeDIV"><h3>exception::~exception</h3>
|
||||
<div class="RenoIncludeDIV"><pre><span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</pre>
|
||||
</div><h4>Effects:</h4>
|
||||
<p>Frees all resources associated with a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object.</p>
|
||||
<p>Frees all resources associated with a boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><h3>See also:</h3>
|
||||
|
53
doc/exception_diagnostic_information.html
Normal file
53
doc/exception_diagnostic_information.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||
<title>exception::diagnostic_information</title>
|
||||
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="body-0">
|
||||
<div class="body-1">
|
||||
<div class="body-2">
|
||||
<div>
|
||||
<div id="boost_logo">
|
||||
<a href="http://www.boost.org"><img style="border:0" src="http://www.boost.org/boost.png" alt="Boost" width="277" height="86"/></a>
|
||||
</div>
|
||||
<h1>Boost Exception</h1>
|
||||
</div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>exception::diagnostic_information</h3>
|
||||
<div class="RenoIncludeDIV"><pre>virtual char const * <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>() const throw();</pre>
|
||||
</div><h4>Returns:</h4>
|
||||
<p>An string representation of all data stored in the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object by the <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> function. See "<span class="RenoLink"><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information</a></span>" for details.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>The return value remains valid until the exception object from which it is obtained is destroyed or modified.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="diagnostic_information.html">diagnostic_information<br/>
|
||||
</a><a href="exception.html">exception<br/>
|
||||
</a><a href="exception_what.html">exception::what<br/>
|
||||
</a><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div id="footer">
|
||||
<p> </p>
|
||||
<hr/>
|
||||
<p>
|
||||
<a class="logo" href="http://jigsaw.w3.org/css-validator/validator?uri=http://revergestudios.com/boost-exception/reno.css"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||
<small>Copyright (c) 2006-2008 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -19,9 +19,20 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception/enable_error_info.hpp</h3>
|
||||
<p>This header file contains the following definitions/declarations:</p>
|
||||
<div class="RenoPageList"><a href="enable_error_info.html">enable_error_info<br/>
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception/enable_error_info.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span>>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">template <class T>
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>( T const & x );</span></span>
|
||||
}</pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="throw_exception_hpp.html">boost/throw_exception.hpp<br/>
|
||||
</a><a href="enable_error_info.html">enable_error_info<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,9 +19,20 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception/enable_current_exception.hpp</h3>
|
||||
<p>This header file contains the following definitions/declarations:</p>
|
||||
<div class="RenoPageList"><a href="enable_current_exception.html">enable_current_exception<br/>
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception/enable_current_exception.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span>>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">template <class T>
|
||||
---unspecified--- <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>( T const & e );</span></span>
|
||||
}</pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="throw_exception_hpp.html">boost/throw_exception.hpp<br/>
|
||||
</a><a href="enable_current_exception.html">enable_current_exception<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,9 +19,24 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception/info_tuple.hpp</h3>
|
||||
<p>This header file contains the following definitions/declarations:</p>
|
||||
<div class="RenoPageList"><a href="operator_shl_exception.html">operator<</exception<br/>
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception/info_tuple.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>#include <boost/tuple/tuple.hpp>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">template <class E, class Tag1, class T1, ..., class TagN, class TN>
|
||||
E const & <span class="RenoLink"><a href="operator_shl_tuple.html">operator<<</a></span>( E const & x,
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span><
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1>,
|
||||
...,
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><TagN,TN> > const & v );</span></span>
|
||||
}</pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_hpp.html">boost/exception.hpp<br/>
|
||||
</a><a href="operator_shl_tuple.html">operator<</tuple<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,9 +19,44 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception/info.hpp</h3>
|
||||
<p>This header file contains the following definitions/declarations:</p>
|
||||
<div class="RenoPageList"><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO<br/>
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception/info.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="exception_exception_hpp.html">boost/exception/exception.hpp</a></span>>
|
||||
#include <boost/current_function.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">template <class Tag,class T>
|
||||
class
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef T value_type;
|
||||
|
||||
error_info( value_type const & );
|
||||
};</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">template <class ErrorInfo,class E>
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span><typename ErrorInfo::value_type const> <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>( E const & x );</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_function,char const *> throw_function;
|
||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_file,char const *> throw_file;
|
||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_line,int> throw_line;
|
||||
|
||||
#define <span class="RenoLink"><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO</a></span>\
|
||||
::boost::throw_function(BOOST_CURRENT_FUNCTION) <<\
|
||||
::boost::throw_file(__FILE__) <<\
|
||||
::boost::throw_line((int)__LINE__)</span>
|
||||
|
||||
<span class="RenoIncludeSPAN">template <class E, class Tag, class T>
|
||||
E const & <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>( E const & x, <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T> const & v );</span></span>
|
||||
}</pre>
|
||||
</div></div><div class="RenoPageList"><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO<br/>
|
||||
</a><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_hpp.html">boost/exception.hpp<br/>
|
||||
</a><a href="error_info.html">error_info<br/>
|
||||
</a><a href="get_error_info.html">get_error_info<br/>
|
||||
</a><a href="operator_shl_exception.html">operator<</exception<br/>
|
||||
|
@ -19,14 +19,18 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception/error_info.hpp</h3>
|
||||
<p>This header file contains the following declaration:</p>
|
||||
<pre>namespace
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception/error_info.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>namespace
|
||||
boost
|
||||
{
|
||||
template <class Tag, class T>
|
||||
class <span class="RenoLink"><a href="error_info.html">error_info</a></span>;
|
||||
<span class="RenoIncludeSPAN"> template <class Tag, class T>
|
||||
class <span class="RenoLink"><a href="error_info.html">error_info</a></span>;</span>
|
||||
}</pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="error_info.html">error_info<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
|
@ -19,9 +19,33 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception/exception.hpp</h3>
|
||||
<p>This header file contains the following definitions/declarations:</p>
|
||||
<div class="RenoPageList"><a href="exception.html">exception<br/>
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception/exception.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">class
|
||||
<span class="RenoLink"><a href="exception.html">exception</a></span>
|
||||
{
|
||||
public:
|
||||
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>() const throw();</span>
|
||||
<span class="RenoIncludeSPAN"> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</span>
|
||||
|
||||
protected:
|
||||
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_constructors.html">exception</a></span>();
|
||||
<span class="RenoLink"><a href="exception_constructors.html">exception</a></span>( <span class="RenoLink"><a href="exception.html">exception</a></span> const & x );</span>
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoLink"><a href="exception_destructor.html">~exception</a></span>();</span>
|
||||
};</span></span>
|
||||
}</pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp<br/>
|
||||
</a><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp<br/>
|
||||
</a><a href="exception_error_info_hpp.html">boost/exception/info.hpp<br/>
|
||||
</a><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp<br/>
|
||||
</a><a href="exception.html">exception<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,17 +19,17 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception.hpp</h3>
|
||||
<p>This header file includes all other header files of Boost Exception:</p>
|
||||
<div class="RenoPageList"><a href="exception_hpp.html">boost/exception.hpp<br/>
|
||||
</a><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp<br/>
|
||||
</a><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp<br/>
|
||||
</a><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp<br/>
|
||||
</a><a href="exception_exception_hpp.html">boost/exception/exception.hpp<br/>
|
||||
</a><a href="exception_error_info_hpp.html">boost/exception/info.hpp<br/>
|
||||
</a><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp<br/>
|
||||
</a><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp<br/>
|
||||
</a><a href="throw_exception_hpp.html">boost/throw_exception.hpp<br/>
|
||||
<div class="RenoIncludeDIV"><h2>boost/exception.hpp</h2>
|
||||
<h2>Synopsis</h2>
|
||||
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||
#include <<span class="RenoLink"><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp</a></span>>
|
||||
#include <<span class="RenoLink"><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></span>>
|
||||
#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>>
|
||||
#include <<span class="RenoLink"><a href="throw_exception_hpp.html">boost/throw_exception.hpp</a></span>></pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information<br/>
|
||||
</a><a href="tutorial_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -20,23 +20,25 @@
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>exception_ptr</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> typedef ---unspecified--- <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span>;</span>
|
||||
}</pre>
|
||||
</div><p>The <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt>'s operations do not throw.</p>
|
||||
<p>Two instances of <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> are equivalent and compare equal if and only if they refer to the same exception.</p>
|
||||
<p>The default constructor of <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> produces the null value of the type. The null value is equivalent only to itself.</p>
|
||||
</div><p>The <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span>'s operations do not throw.</p>
|
||||
<p>Two instances of <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> are equivalent and compare equal if and only if they refer to the same exception.</p>
|
||||
<p>The default constructor of <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> produces the null value of the type. The null value is equivalent only to itself.</p>
|
||||
<h4>Note:</h4>
|
||||
<p><tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> objects are returned by <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> and <tt><span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>()</tt>.</p>
|
||||
<p> <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> objects are returned by <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> and <span class="RenoLink"><a href="copy_exception.html">copy_exception</a></span>.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp<br/>
|
||||
</a><a href="copy_exception.html">copy_exception<br/>
|
||||
</a><a href="current_exception.html">current_exception<br/>
|
||||
</a><a href="enable_current_exception.html">enable_current_exception<br/>
|
||||
</a><a href="rethrow_exception.html">rethrow_exception<br/>
|
||||
</a><a href="unknown_exception.html">unknown_exception<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,17 +19,16 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>exception::what()</h3>
|
||||
<div class="RenoIncludeDIV"><pre> virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</pre>
|
||||
<div class="RenoIncludeDIV"><h3>exception::what</h3>
|
||||
<div class="RenoIncludeDIV"><pre>virtual char const * <span class="RenoLink"><a href="exception_what.html">what</a></span>() const throw();</pre>
|
||||
</div><h4>Returns:</h4>
|
||||
<p>An string representation of all data stored in the <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object by the <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> function. See "<span class="RenoLink"><a href="logging.html">Tutorial: Logging of boost::exception Objects</a></span>" for details.</p>
|
||||
<p>The default implementation is equivalent to return <span class="RenoLink"><a href="exception_diagnostic_information.html">exception::diagnostic_information</a></span>(). The signature of boost::<span class="RenoLink"><a href="exception_what.html">exception::what</a></span> is identical to the familiar std::exception::what function, so that when an exception type that derives both std::exception and boost::<span class="RenoLink"><a href="exception.html">exception</a></span> overrides the what function, it overrides both std::exception::what and boost::<span class="RenoLink"><a href="exception_what.html">exception::what</a></span>.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>The return value remains valid until the exception object from which it is obtained is destroyed or modified.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="exception.html">exception<br/>
|
||||
</a><a href="logging.html">Tutorial: Logging of boost::exception Objects<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,8 +19,8 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>get_error_info()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>get_error_info</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
@ -28,13 +28,14 @@ boost
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span><typename ErrorInfo::value_type const> <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>( E const & x );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p>The type of the <tt>x</tt> object must derive from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>; <tt>ErrorInfo</tt> must be an instance of the <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt> template.</p>
|
||||
<p>The type of the x object must derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>; ErrorInfo must be an instance of the <span class="RenoLink"><a href="error_info.html">error_info</a></span> template.</p>
|
||||
<h4>Returns:</h4>
|
||||
<p>If <tt>x</tt> does not store an object of type <tt>ErrorInfo</tt>, returns an empty <tt><span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span></tt>; otherwise returns pointer to the stored value. Use <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> to store values in exception objects.</p>
|
||||
<p>If x does not store an object of type ErrorInfo, returns an empty <span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span>; otherwise returns pointer to the stored value. Use <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> to store values in exception objects.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>Nothing.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_error_info_hpp.html">boost/exception/info.hpp<br/>
|
||||
</a><a href="error_info.html">error_info<br/>
|
||||
</a><a href="exception.html">exception<br/>
|
||||
</a></div>
|
||||
|
@ -24,6 +24,7 @@
|
||||
<p><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO</a></p>
|
||||
<h3>b</h3>
|
||||
<p><a href="exception_hpp.html">boost/exception.hpp</a></p>
|
||||
<p><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></p>
|
||||
<p><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></p>
|
||||
<p><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></p>
|
||||
<p><a href="exception_error_info_value_hpp.html">boost/exception/error_info.hpp</a></p>
|
||||
@ -35,11 +36,14 @@
|
||||
<h3>c</h3>
|
||||
<p><a href="copy_exception.html">copy_exception</a></p>
|
||||
<p><a href="current_exception.html">current_exception</a></p>
|
||||
<h3>d</h3>
|
||||
<p><a href="diagnostic_information.html">diagnostic_information</a></p>
|
||||
<h3>e</h3>
|
||||
<p><a href="enable_current_exception.html">enable_current_exception</a></p>
|
||||
<p><a href="enable_error_info.html">enable_error_info</a></p>
|
||||
<p><a href="error_info.html">error_info</a></p>
|
||||
<p><a href="exception.html">exception</a></p>
|
||||
<p><a href="exception_diagnostic_information.html">exception::diagnostic_information</a></p>
|
||||
<p><a href="exception_constructors.html">exception::exception</a></p>
|
||||
<p><a href="exception_what.html">exception::what</a></p>
|
||||
<p><a href="exception_destructor.html">exception::~exception</a></p>
|
||||
@ -48,8 +52,14 @@
|
||||
<p><a href="get_error_info.html">get_error_info</a></p>
|
||||
<h3>o</h3>
|
||||
<p><a href="operator_shl_exception.html">operator<</exception</a></p>
|
||||
<p><a href="operator_shl_tuple.html">operator<</tuple</a></p>
|
||||
<h3>r</h3>
|
||||
<p><a href="rethrow_exception.html">rethrow_exception</a></p>
|
||||
<h3>T</h3>
|
||||
<p><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information</a></p>
|
||||
<p><a href="tutorial_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies</a></p>
|
||||
<p><a href="tutorial_transporting_data.html">Tutorial: Transporting of Arbitrary Data to the Catch Site</a></p>
|
||||
<p><a href="tutorial_exception_ptr.html">Tutorial: Transporting of Exceptions between Threads</a></p>
|
||||
<h3>t</h3>
|
||||
<p><a href="throw_exception.html">throw_exception</a></p>
|
||||
<h3>u</h3>
|
||||
|
@ -19,39 +19,33 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>operator<<()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>></tt><span class="RenoBR"> </span><br/><tt>#include <<span class="RenoLink"><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>operator<<, error_info overload</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>><span class="RenoBR"> </span><br/></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> template <class E, class Tag1, class T1>
|
||||
E const & operator<<( E const & x, <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1> const & v );
|
||||
|
||||
template <class E, class Tag1, class T1, ..., class TagN, class TN>
|
||||
E const & operator<<( E const & x,
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span><
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1>,
|
||||
...,
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><TagN,TN> > const & v );</span>
|
||||
<span class="RenoIncludeSPAN"> template <class E, class Tag, class T>
|
||||
E const & <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>( E const & x, <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T> const & v );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>E</tt> must be <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, or a type that derives (indirectly) from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>.</p>
|
||||
<p>E must be boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, or a type that derives (indirectly) from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
<h4>Effects:</h4>
|
||||
<div><ul><li> The first overload stores a copy of <tt>v</tt> into <tt>x</tt>. If <tt>x</tt> already contains data of type <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1></tt>, that data is overwritten.</li>
|
||||
<li> The <tt>boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span></tt> overload is equivalent to <tt>x << v.<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements">get</a></span><0>() << ... << v.<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements">get</a></span><N>()</tt>.</li>
|
||||
</ul></div>
|
||||
<p>Stores a copy of v into x. If x already contains data of type <span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1>, that data is overwritten.</p>
|
||||
<h4>Returns:</h4>
|
||||
<p><tt>x</tt>.</p>
|
||||
<p>x.</p>
|
||||
<div class="RenoIncludeDIV"><h4>Throws:</h4>
|
||||
<p><tt>std::bad_alloc</tt>, or any exception emitted by <tt>T1..TN</tt> copy constructor.</p>
|
||||
<p>std::bad_alloc, or any exception emitted by the T copy constructor.</p>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="BOOST_ERROR_INFO.html">BOOST_ERROR_INFO<br/>
|
||||
</a><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_error_info_hpp.html">boost/exception/info.hpp<br/>
|
||||
</a><a href="error_info.html">error_info<br/>
|
||||
</a><a href="exception.html">exception<br/>
|
||||
</a><a href="exception_diagnostic_information.html">exception::diagnostic_information<br/>
|
||||
</a><a href="exception_constructors.html">exception::exception<br/>
|
||||
</a><a href="get_error_info.html">get_error_info<br/>
|
||||
</a><a href="using_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a><a href="logging.html">Tutorial: Logging of boost::exception Objects<br/>
|
||||
</a><a href="tutorial_diagnostic_information.html">Tutorial: Diagnostic Information<br/>
|
||||
</a><a href="tutorial_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
63
doc/operator_shl_tuple.html
Normal file
63
doc/operator_shl_tuple.html
Normal file
@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||
<title>operator<</tuple</title>
|
||||
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="body-0">
|
||||
<div class="body-1">
|
||||
<div class="body-2">
|
||||
<div>
|
||||
<div id="boost_logo">
|
||||
<a href="http://www.boost.org"><img style="border:0" src="http://www.boost.org/boost.png" alt="Boost" width="277" height="86"/></a>
|
||||
</div>
|
||||
<h1>Boost Exception</h1>
|
||||
</div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>operator<<, tuple overload</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> template <class E, class Tag1, class T1, ..., class TagN, class TN>
|
||||
E const & <span class="RenoLink"><a href="operator_shl_tuple.html">operator<<</a></span>( E const & x,
|
||||
<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span><
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag1,T1>,
|
||||
...,
|
||||
<span class="RenoLink"><a href="error_info.html">error_info</a></span><TagN,TN> > const & v );</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p>E must be boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, or a type that derives (indirectly) from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
<h4>Effects:</h4>
|
||||
<p>Equivalent to x << v.<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements">get</a></span><0>() << ... << v.<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements">get</a></span><N>().</p>
|
||||
<h4>Returns:</h4>
|
||||
<p>x.</p>
|
||||
<div class="RenoIncludeDIV"><h4>Throws:</h4>
|
||||
<p>std::bad_alloc, or any exception emitted by T1..TN copy constructor.</p>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div id="footer">
|
||||
<p> </p>
|
||||
<hr/>
|
||||
<p>
|
||||
<a class="logo" href="http://jigsaw.w3.org/css-validator/validator?uri=http://revergestudios.com/boost-exception/reno.css"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||
<small>Copyright (c) 2006-2008 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -19,19 +19,20 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>rethrow_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>rethrow_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> void <span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>( <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> const & ep );</span>
|
||||
}</pre>
|
||||
</div><h4>Precondition:</h4>
|
||||
<p><tt>ep</tt> shall not be null.</p>
|
||||
<p>ep shall not be null.</p>
|
||||
<h4>Throws:</h4>
|
||||
<p>The exception to which <tt>ep</tt> refers.</p>
|
||||
<p>The exception to which ep refers.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,28 +19,33 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>throw_exception()</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="throw_exception_hpp.html">boost/throw_exception.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><h3>throw_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="throw_exception_hpp.html">boost/throw_exception.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN">#ifdef BOOST_NO_EXCEPTIONS
|
||||
<span class="RenoIncludeSPAN"> #ifdef BOOST_NO_EXCEPTIONS
|
||||
|
||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( std::exception const & e ); // user defined
|
||||
#else
|
||||
|
||||
#else
|
||||
|
||||
template <class E>
|
||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( E const & e );
|
||||
#endif</span>
|
||||
|
||||
#endif</span>
|
||||
}</pre>
|
||||
</div><h4>Requirements:</h4>
|
||||
<p><tt>E</tt> must derive publicly from <tt>std::exception</tt>.</p>
|
||||
<p>E must derive publicly from std::exception.</p>
|
||||
<h4>Effects:</h4>
|
||||
<div><ul><li> If <tt>BOOST_NO_EXCEPTIONS</tt> is not defined, <tt>boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>(e)</tt> is equivalent to <tt>throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(boost::<span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>(e))</tt>, unless <tt>BOOST_EXCEPTION_DISABLE</tt> is defined, in which case <tt>boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>(e)</tt> is equivalent to <tt>throw e;</tt></li>
|
||||
<li> If <tt>BOOST_NO_EXCEPTIONS</tt> is defined, the function is left undefined, and the user is expected to supply an appropriate definition. Callers of <tt>throw_exception</tt> are allowed to assume that the function never returns; therefore, if the user-defined <tt>throw_exception</tt> returns, the behavior is undefined.</li>
|
||||
<div><ul><li> If BOOST_NO_EXCEPTIONS is not defined, boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>(e) is equivalent to throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(boost::<span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>(e)), unless BOOST_EXCEPTION_DISABLE is defined, in which case boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>(e) is equivalent to throw e;</li>
|
||||
<li> If BOOST_NO_EXCEPTIONS is defined, the function is left undefined, and the user is expected to supply an appropriate definition. Callers of throw_exception are allowed to assume that the function never returns; therefore, if the user-defined throw_exception returns, the behavior is undefined.</li>
|
||||
</ul></div>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="throw_exception_hpp.html">boost/throw_exception.hpp<br/>
|
||||
</a><a href="enable_current_exception.html">enable_current_exception<br/>
|
||||
</a><a href="cloning.html">Tutorial: Transporting of Exceptions between Threads<br/>
|
||||
</a><a href="tutorial_exception_ptr.html">Tutorial: Transporting of Exceptions between Threads<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -19,9 +19,30 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<h3>boost/exception/throw_exception.hpp</h3>
|
||||
<p>This header file contains the following definitions/declarations:</p>
|
||||
<div class="RenoPageList"><a href="throw_exception.html">throw_exception<br/>
|
||||
<div class="RenoIncludeDIV"><h2>boost/throw_exception.hpp</h2>
|
||||
<h3>Synopsis</h3>
|
||||
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></span>>
|
||||
#include <<span class="RenoLink"><a href="exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></span>>
|
||||
#include <exception>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">#ifdef BOOST_NO_EXCEPTIONS
|
||||
|
||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( std::exception const & e ); // user defined
|
||||
|
||||
#else
|
||||
|
||||
template <class E>
|
||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( E const & e );
|
||||
|
||||
#endif</span></span>
|
||||
}</pre>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_hpp.html">boost/exception.hpp<br/>
|
||||
</a><a href="throw_exception.html">throw_exception<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
|
@ -3,7 +3,7 @@
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||
<title>Tutorial: Logging of boost::exception Objects</title>
|
||||
<title>Tutorial: Diagnostic Information</title>
|
||||
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||
</head>
|
||||
<body>
|
||||
@ -19,8 +19,8 @@
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h2>Logging of boost::exception Objects</h2>
|
||||
<p>Class <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> provides a virtual member function <tt><span class="RenoLink"><a href="exception_what.html">what</a></span>()</tt>, with a signature identical to the familiar <tt>std::exception::what()</tt> function. The default implementation returns a string value that is not presentable as a friendly user message, but because it is generated automatically, it is useful for debugging or logging purposes. Here is an example:</p>
|
||||
<div class="RenoIncludeDIV"><h2>Diagnostic Information</h2>
|
||||
<p>Class boost::<span class="RenoLink"><a href="exception.html">exception</a></span> provides a virtual member function <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>, with a signature similar to the familiar std::exception::what function. The default implementation returns a string value that is not presentable as a friendly user message, but because it is generated automatically, it is useful for debugging or logging purposes. Here is an example:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span>>
|
||||
#include <iostream>
|
||||
|
||||
@ -36,15 +36,16 @@ g()
|
||||
catch(
|
||||
boost::<span class="RenoLink"><a href="exception.html">exception</a></span> & e )
|
||||
{
|
||||
std::cerr << e.<span class="RenoLink"><a href="exception_what.html">what</a></span>();
|
||||
std::cerr << e.<span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span>();
|
||||
}
|
||||
}</pre>
|
||||
<p>The <tt><span class="RenoLink"><a href="exception_what.html">what</a></span>()</tt> member function iterates over all data objects stored in the <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> through <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt>. The returned string is constructed by converting each data object to string and then concatenating these strings together.</p>
|
||||
<p>When the <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span><Tag,T></tt> template is instantiated, the system attempts overload resolution for an unqualified call to <tt>to_string(x)</tt>, where <tt>x</tt> is of type <tt>T</tt>. If this is successful, the <tt>to_string()</tt> overload is used to convert objects of type <tt>T</tt> to string.</p>
|
||||
<p>Otherwise, the system attempts overload resolution for <tt>s << x</tt>, where <tt>s</tt> is a <tt>std::ostringstream</tt> and <tt>x</tt> is of type <tt>T</tt>. If this is successful, the <tt>operator<<</tt> overload is used to convert objects of type <tt>T</tt> to string.</p>
|
||||
<p>Otherwise the system is unable to convert objects of type <tt>T</tt> to string, and an unspecified stub string value is used without issuing a compile error.</p>
|
||||
<p>The <span class="RenoLink"><a href="exception_diagnostic_information.html">diagnostic_information</a></span> member function iterates over all data objects stored in the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> through <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>. The returned string is constructed by converting each data object to string and then concatenating these strings together.</p>
|
||||
<p>When the <span class="RenoLink"><a href="error_info.html">error_info</a></span><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 used to convert objects of type T to string.</p>
|
||||
<p>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.</p>
|
||||
<p>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.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_diagnostic_information.html">exception::diagnostic_information<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
@ -20,7 +20,7 @@
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h2>Integrating Boost Exception in Existing Exception Class Hierarchies</h2>
|
||||
<p>Some exception hierarchies can not be modified to make <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> a base type. For this case, the <tt><span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span>()</tt> function template can be used to make exception objects derive from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> anyway. Here is an example:</p>
|
||||
<p>Some exception hierarchies can not be modified to make boost::<span class="RenoLink"><a href="exception.html">exception</a></span> a base type. For this case, the <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span> function template can be used to make exception objects derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> anyway. Here is an example:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span>>
|
||||
#include <stdexcept>
|
||||
|
||||
@ -48,7 +48,7 @@ my_container
|
||||
}
|
||||
};
|
||||
</pre>
|
||||
<p><tt><span class="RenoLink"><a href="enable_error_info.html">Enable_error_info</a></span><T></tt> returns an object of <i>unspecified type</i> which is guaranteed to derive from both <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> and <tt>T</tt>. This makes it possible to use <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> to store additional information in the exception object. The exception can be intercepted as <tt>T &</tt>, therefore existing exception handling will not break. It can also be intercepted as <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span> &</tt>, so that <span class="RenoLink"><a href="transporting_data.html">more information can be added to the exception at a later time</a></span>.</p>
|
||||
<p>The call to <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span><T> gets us an object of <i>unspecified type</i> which is guaranteed to derive from both boost::<span class="RenoLink"><a href="exception.html">exception</a></span> and T. This makes it possible to use <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> 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::<span class="RenoLink"><a href="exception.html">exception</a></span> &, so that <span class="RenoLink"><a href="tutorial_transporting_data.html">more information can be added to the exception at a later time</a></span>.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a></div>
|
@ -20,10 +20,10 @@
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h2>Transporting of Exceptions between Threads</h2>
|
||||
<p>Boost Exception supports transporting of exception objects between threads through cloning. This system is similar to <span class="RenoLink"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">N2179</a></span>, but because Boost Exception can not rely on language support, the use of <tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt> at the time of the throw is required in order to use cloning.</p>
|
||||
<p>Boost Exception supports transporting of exception objects between threads through cloning. This system is similar to <span class="RenoLink"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">N2179</a></span>, but because Boost Exception can not rely on language support, the use of <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> at the time of the throw is required in order to use cloning.</p>
|
||||
<h4>Note:</h4>
|
||||
<p>All exceptions emitted by the familiar function <tt>boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>()</tt> are guaranteed to derive from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> and to support cloning.</p>
|
||||
<div class="RenoIncludeDIV"><h3>Using enable_current_exception() at the Time of the Throw</h3>
|
||||
<p>All exceptions emitted by the familiar function boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span> are guaranteed to derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> and to support cloning.</p>
|
||||
<div class="RenoIncludeDIV"><h3>Using enable_current_exception at the Time of the Throw</h3>
|
||||
<p>Here is how cloning can be enabled in a throw-expression (15.1):</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_enable_exception_cloning_hpp.html">boost/exception/enable_current_exception.hpp</a></span>>
|
||||
#include <<span class="RenoLink"><a href="exception_error_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||
@ -41,8 +41,9 @@ file_read( FILE * f, void * buffer, size_t size )
|
||||
throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(file_read_error()) <<
|
||||
errno_info(errno);
|
||||
}</pre>
|
||||
<p>Of course, <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> may be used with any exception type; there is no requirement that it should derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>Cloning and Re-throwing an Exception</h3>
|
||||
<p>When you catch a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, you can call <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> to get an <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> object:</p>
|
||||
<p>When you catch an exception, you can call <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> to get an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> object:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>>
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
@ -63,7 +64,7 @@ worker_thread( boost::<span class="RenoLink"><a href="exception_ptr.html">except
|
||||
error = boost::<span class="RenoLink"><a href="current_exception.html">current_exception</a></span>();
|
||||
}
|
||||
}</pre>
|
||||
<p>In the above example, note that <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> captures the original type of the exception object. The exception can be thrown again using the <tt><span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>()</tt> function:</p>
|
||||
<p>In the above example, note that <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> captures the original type of the exception object. The exception can be thrown again using the <span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span> function:</p>
|
||||
<pre>// ...continued
|
||||
|
||||
void
|
||||
@ -75,14 +76,12 @@ work()
|
||||
if( error )
|
||||
boost::<span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>(error);
|
||||
}</pre>
|
||||
<p><tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> could fail to copy the original exception object in the following cases:</p>
|
||||
<div><ul><li> if there is not enough memory, in which case the returned <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> points to an instance of <tt>std::bad_alloc</tt>, or</li>
|
||||
<li> if <tt><span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>()</tt> was not used in the throw-expression passed to the original <tt>throw</tt> statement and the current implementation does not have the necessary compiler-specific support to copy the exception automatically, in which case the returned <tt><span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span></tt> points to an instance of <tt><span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span></tt>.</li>
|
||||
<p>Note that <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> could fail to copy the original exception object in the following cases:* if there is not enough memory, in which case the returned <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> points to an instance of std::bad_alloc, or</p>
|
||||
<div><ul><li> if <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> 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 <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> points to an instance of <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>.</li>
|
||||
</ul></div>
|
||||
<p>Regardless, the use of <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt> and <tt><span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span>()</tt> in the above examples is well-formed.</p>
|
||||
<p>Regardless, the use of <span class="RenoLink"><a href="current_exception.html">current_exception</a></span> and <span class="RenoLink"><a href="rethrow_exception.html">rethrow_exception</a></span> in the above examples is well-formed.</p>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="unknown_exception.html">unknown_exception<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
@ -20,9 +20,9 @@
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h2>Transporting of Arbitrary Data to the Catch Site</h2>
|
||||
<p>All exception types that derive from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> 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 classes. Data can be added to a <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> at the time of the throw, or at a later time.</p>
|
||||
<p>All exception types that derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> 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::<span class="RenoLink"><a href="exception.html">exception</a></span> at the time of the throw, or at a later time.</p>
|
||||
<div class="RenoIncludeDIV"><h3>Adding of Arbitrary Data at the Point of the Throw</h3>
|
||||
<p>The following example demonstrates how <tt>errno</tt> can be stored in exception objects using Boost Exception:</p>
|
||||
<p>The following example demonstrates how errno can be stored in exception objects using Boost Exception:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span>>
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
@ -37,10 +37,10 @@ f()
|
||||
throw my_error() << errno_info(errno); //(3)
|
||||
}
|
||||
</pre>
|
||||
<p>First, we instantiate the <tt><span class="RenoLink"><a href="error_info.html">error_info</a></span></tt> template using a unique identifier -- <tt>tag_errno</tt>, and the type of the info it identifies -- <tt>int</tt>. This provides compile-time type safety for the various values stored in exception objects.</p>
|
||||
<p>Second, we define class <tt>my_error</tt>, which derives from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>.</p>
|
||||
<p>Finally, (3) illustrates how the <tt>typedef</tt> from (1) can be used with <tt><span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span>()</tt> to store values in exception objects at the point of the throw.</p>
|
||||
<p>The stored <tt>errno</tt> value can be recovered at a later time like this:</p>
|
||||
<p>First, we instantiate the <span class="RenoLink"><a href="error_info.html">error_info</a></span> 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.</p>
|
||||
<p>Second, we define class my_error, which derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||
<p>Finally, (3) illustrates how the typedef from (1) can be used with <span class="RenoLink"><a href="operator_shl_exception.html">operator<<</a></span> to store values in exception objects at the point of the throw.</p>
|
||||
<p>The stored errno value can be recovered at a later time like this:</p>
|
||||
<pre>// ...continued
|
||||
|
||||
void
|
||||
@ -57,7 +57,7 @@ g()
|
||||
std::cerr << "Error code: " << *err;
|
||||
}
|
||||
}</pre>
|
||||
<p>The <tt><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>()</tt> function template is instantiated with the <tt>typedef</tt> from (1), and is passed an exception object of any type that derives publicly from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>. If the exception object contains the requested value, the returned <tt><span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span></tt> will point to it; otherwise an empty <tt><span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span></tt> is returned.</p>
|
||||
<p>The <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span> function template is instantiated with the typedef from (1), and is passed an exception object of any type that derives publicly from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>. If the exception object contains the requested value, the returned <span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span> will point to it; otherwise an empty <span class="RenoLink"><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr</a></span> is returned.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>Adding of Arbitrary Data to Active Exception Objects</h3>
|
||||
<p>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:</p>
|
||||
<pre>#include <stdio.h>
|
||||
@ -91,9 +91,9 @@ file_read( FILE * f, void * buffer, size_t size )
|
||||
if( size!=fread(buffer,1,size,f) )
|
||||
throw file_read_error("????");
|
||||
}</pre>
|
||||
<p>We have defined an exception class <tt>file_read_error</tt> which can store a file name, so that when we catch a <tt>file_read_error</tt> object, we know which file the failure is related to. However, the <tt>file_read</tt> function does not have the file name at the time of the throw; all it has is a <tt>FILE</tt> handle.</p>
|
||||
<p>One possible solution is to not use <tt>FILE</tt> handles directly. We could have our own <tt>class file</tt> which stores both a <tt>FILE</tt> handle and a file name, and pass that to <tt>file_read()</tt>. However, this could be problematic if we communicate with 3rd party code that does not use our <tt>class file</tt> (probably because they have their own similar class.)</p>
|
||||
<p>A better solution is to make class <tt>file_read_error</tt> derive (possibly indirectly) from <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt>, and free the <tt>file_read()</tt> function from the burden of storing the file name in exceptions it throws:</p>
|
||||
<p>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.</p>
|
||||
<p>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.)</p>
|
||||
<p>A better solution is to make class file_read_error derive (possibly indirectly) from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, and free the file_read function from the burden of storing the file name in exceptions it throws:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span>>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -108,7 +108,7 @@ file_read( FILE * f, void * buffer, size_t size )
|
||||
if( size!=fread(buffer,1,size,f) )
|
||||
throw file_read_error() << errno_info(errno);
|
||||
}</pre>
|
||||
<p>If <tt>file_read()</tt> detects a failure, it throws an exception which contains the information that is available at the time, namely the <tt>errno</tt>. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally:</p>
|
||||
<p>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:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_hpp.html">boost/exception.hpp</a></span>>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <stdio.h>
|
||||
@ -136,10 +136,10 @@ parse_file( char const * file_name )
|
||||
throw;
|
||||
}
|
||||
}</pre>
|
||||
<p>The above function is (almost) exception-neutral -- if an exception is emitted by any function call within the <tt>try</tt> block, <tt>parse_file()</tt> does not need to do any real work, but it intercepts any <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object, stores the file name, and re-throws using a throw-expression with no operand (15.1.6). The rationale for catching any <tt>boost::<span class="RenoLink"><a href="exception.html">exception</a></span></tt> object is that the file name is relevant to any failure that occurs in <tt>parse_file()</tt>, <i>even if the failure is unrelated to file I/O</i>.</p>
|
||||
<p>As usual, the stored data can be retrieved using <tt><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>()</tt>.</p>
|
||||
<p>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::<span class="RenoLink"><a href="exception.html">exception</a></span> object, stores the file name, and re-throws using a throw-expression with no operand (15.1.6). The rationale for catching any boost::<span class="RenoLink"><a href="exception.html">exception</a></span> object is that the file name is relevant to any failure that occurs in parse_file, <i>even if the failure is unrelated to file I/O</i>.</p>
|
||||
<p>As usual, the stored data can be retrieved using <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>.</p>
|
||||
</div><div class="RenoIncludeDIV"><h3>Adding Grouped Data to Exceptions</h3>
|
||||
<p>The code snippet below demonstrates how <tt>boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span></tt> can be used to bundle the name of the function that failed, together with the reported <tt>errno</tt> so that they can be added to exception objects more conveniently together:</p>
|
||||
<p>The code snippet below demonstrates how boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span> 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:</p>
|
||||
<pre>#include <<span class="RenoLink"><a href="exception_error_info_group_hpp.html">boost/exception/info_tuple.hpp</a></span>>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <stdio.h>
|
||||
@ -163,10 +163,10 @@ file_open( char const * name, char const * mode )
|
||||
file_name_info(name) <<
|
||||
clib_failure("fopen",errno);
|
||||
}</pre>
|
||||
<p>Note that the members of a <tt>boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span></tt> are stored separately in exception objects; they can only be retrieved individually, using <tt><span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>()</tt>.</p>
|
||||
<p>Note that the members of a boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span> are stored separately in exception objects; they can only be retrieved individually, using <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>.</p>
|
||||
</div></div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="using_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a><a href="tutorial_enable_error_info.html">Tutorial: Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||
</a></div>
|
||||
<!-- Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
@ -20,21 +20,22 @@
|
||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="RenoIncludeDIV"><h3>unknown_exception</h3>
|
||||
<div class="RenoIncludeDIV"><p><tt>#include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></tt></p>
|
||||
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp</a></span>></p>
|
||||
<pre>namespace
|
||||
boost
|
||||
{
|
||||
<span class="RenoIncludeSPAN"> class
|
||||
<span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span>:
|
||||
public std::exception
|
||||
public boost::exception
|
||||
public boost::<span class="RenoLink"><a href="exception.html">exception</a></span>
|
||||
{
|
||||
---unspecified---
|
||||
};</span>
|
||||
}</pre>
|
||||
</div><p>This type is used by the <span class="RenoLink"><a href="cloning.html">cloning</a></span> support in Boost Exception. Please see <tt><span class="RenoLink"><a href="current_exception.html">current_exception</a></span>()</tt>.</p>
|
||||
</div><p>This type is used by the <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> support in Boost Exception. Please see <span class="RenoLink"><a href="current_exception.html">current_exception</a></span>.</p>
|
||||
</div><h3>See also:</h3>
|
||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||
</a><a href="exception_cloning_hpp.html">boost/exception_ptr.hpp<br/>
|
||||
</a><a href="current_exception.html">current_exception<br/>
|
||||
</a><a href="enable_current_exception.html">enable_current_exception<br/>
|
||||
</a></div>
|
||||
|
@ -41,7 +41,7 @@ error: //Base for all exception objects we throw.
|
||||
char const *
|
||||
what() const throw()
|
||||
{
|
||||
return boost::exception::what();
|
||||
return boost::exception::diagnostic_information();
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -169,8 +169,8 @@ dump_all_info( boost::exception const & x )
|
||||
dump_copy_info(x);
|
||||
dump_file_info(x);
|
||||
dump_clib_info(x);
|
||||
std::cout << "\nOutput from what():\n";
|
||||
std::cout << x.what();
|
||||
std::cout << "\nOutput from diagnostic_information():\n";
|
||||
std::cout << x.diagnostic_information();
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -20,6 +20,6 @@ g()
|
||||
catch(
|
||||
boost::exception & e )
|
||||
{
|
||||
std::cerr << e.what();
|
||||
std::cerr << e.diagnostic_information();
|
||||
}
|
||||
}
|
||||
|
39
include/boost/exception/detail/object_hex_dump.hpp
Normal file
39
include/boost/exception/detail/object_hex_dump.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef UUID_6F463AC838DF11DDA3E6909F56D89593
|
||||
#define UUID_6F463AC838DF11DDA3E6909F56D89593
|
||||
|
||||
#include <iomanip>
|
||||
#include <typeinfo>
|
||||
#include <ios>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
namespace
|
||||
exception_detail
|
||||
{
|
||||
template <class T>
|
||||
std::string
|
||||
object_hex_dump( T const & x, size_t max_size=16 )
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << "type: " << typeid(x).name() << ", size: " << sizeof(T) << ", dump: ";
|
||||
size_t n=sizeof(T)>max_size?max_size:sizeof(T);
|
||||
s.fill('0');
|
||||
s.width(2);
|
||||
unsigned char const * b=reinterpret_cast<unsigned char const *>(&x);
|
||||
s << std::setw(2) << std::hex << (unsigned int)*b;
|
||||
for( unsigned char const * e=b+n; ++b!=e; )
|
||||
s << " " << std::setw(2) << std::hex << (unsigned int)*b;
|
||||
return s.str();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
27
include/boost/exception/diagnostic_information.hpp
Normal file
27
include/boost/exception/diagnostic_information.hpp
Normal file
@ -0,0 +1,27 @@
|
||||
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef UUID_0552D49838DD11DD90146B8956D89593
|
||||
#define UUID_0552D49838DD11DD90146B8956D89593
|
||||
|
||||
#include <boost/exception/exception.hpp>
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
inline
|
||||
std::string
|
||||
diagnostic_information( std::exception const & x )
|
||||
{
|
||||
if( exception const * be = dynamic_cast<exception const *>(&x) )
|
||||
return be->diagnostic_information();
|
||||
else
|
||||
return std::string("[ what: ") + x.what() + ", type: " + typeid(x).name() + " ]";
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -92,7 +92,7 @@ boost
|
||||
count_(0)
|
||||
{
|
||||
if( boost::exception * be1=dynamic_cast<boost::exception *>(this) )
|
||||
if( boost::exception const * be2=dynamic_cast<boost::exception const *>(&x) )
|
||||
if( boost::exception const * be2=dynamic_cast<boost::exception const *>(&x) )
|
||||
*be1 = *be2;
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,18 @@ boost
|
||||
~error_info_injector() throw()
|
||||
{
|
||||
}
|
||||
|
||||
char const *
|
||||
what() const throw()
|
||||
{
|
||||
return T::what();
|
||||
}
|
||||
|
||||
char const *
|
||||
diagnostic_information() const throw()
|
||||
{
|
||||
return exception::_diagnostic_information(T::what());
|
||||
}
|
||||
};
|
||||
|
||||
struct large_size { char c[256]; };
|
||||
|
@ -27,7 +27,7 @@ boost
|
||||
error_info_container:
|
||||
public exception_detail::counted_base
|
||||
{
|
||||
virtual char const * what( std::type_info const & ) const = 0;
|
||||
virtual char const * diagnostic_information( char const *, std::type_info const & ) const = 0;
|
||||
virtual shared_ptr<error_info_base const> get( std::type_info const & ) const = 0;
|
||||
virtual void set( shared_ptr<error_info_base const> const & ) = 0;
|
||||
};
|
||||
@ -51,17 +51,14 @@ boost
|
||||
char const *
|
||||
what() const throw()
|
||||
{
|
||||
if( data_ )
|
||||
try
|
||||
{
|
||||
char const * w = data_->what(typeid(*this));
|
||||
BOOST_ASSERT(0!=w);
|
||||
return w;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
}
|
||||
return typeid(*this).name();
|
||||
return diagnostic_information();
|
||||
}
|
||||
|
||||
virtual
|
||||
char const *
|
||||
diagnostic_information() const throw()
|
||||
{
|
||||
return _diagnostic_information(0);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -75,6 +72,22 @@ boost
|
||||
{
|
||||
}
|
||||
|
||||
char const *
|
||||
_diagnostic_information( char const * std_what ) const throw()
|
||||
{
|
||||
if( data_ )
|
||||
try
|
||||
{
|
||||
char const * w = data_->diagnostic_information(std_what,typeid(*this));
|
||||
BOOST_ASSERT(0!=w);
|
||||
return w;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
}
|
||||
return std_what ? std_what : typeid(*this).name();
|
||||
}
|
||||
|
||||
#if BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1500) )
|
||||
//Force class exception to be abstract.
|
||||
//Otherwise, MSVC bug allows throw exception(), even though the copy constructor is protected.
|
||||
|
@ -85,13 +85,6 @@ virtual //Disable bogus GCC warning.
|
||||
value_type const value_;
|
||||
};
|
||||
|
||||
template <class ErrorInfo>
|
||||
struct
|
||||
error_info_type
|
||||
{
|
||||
typedef typename ErrorInfo::value_type value_type;
|
||||
};
|
||||
|
||||
template <class E,class Tag,class T>
|
||||
E const &
|
||||
operator<<( E const & x, error_info<Tag,T> const & v )
|
||||
@ -155,11 +148,18 @@ virtual //Disable bogus GCC warning.
|
||||
}
|
||||
|
||||
char const *
|
||||
what( std::type_info const & exception_type ) const
|
||||
diagnostic_information( char const * std_what, std::type_info const & exception_type ) const
|
||||
{
|
||||
if( what_.empty() )
|
||||
{
|
||||
std::string tmp(exception_type.name());
|
||||
std::string tmp;
|
||||
if( std_what )
|
||||
{
|
||||
tmp += std_what;
|
||||
tmp += '\n';
|
||||
}
|
||||
tmp += "Dynamic exception type: ";
|
||||
tmp += exception_type.name();
|
||||
tmp += '\n';
|
||||
for( error_info_map::const_iterator i=info_.begin(),end=info_.end(); i!=end; ++i )
|
||||
{
|
||||
|
@ -53,6 +53,20 @@ boost
|
||||
{
|
||||
enum e { value=to_string_detail::has_to_string_impl<T,is_output_streamable<T>::value>::value };
|
||||
};
|
||||
|
||||
template <class T,class U>
|
||||
std::string
|
||||
to_string( std::pair<T,U> const & x )
|
||||
{
|
||||
return std::string("(") + to_string(x.first) + ',' + to_string(x.second) + ')';
|
||||
}
|
||||
|
||||
inline
|
||||
std::string
|
||||
to_string( std::exception const & x )
|
||||
{
|
||||
return x.what();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -7,9 +7,8 @@
|
||||
#define UUID_E788439ED9F011DCB181F25B55D89593
|
||||
|
||||
#include <boost/exception/to_string.hpp>
|
||||
#include <iomanip>
|
||||
#include <typeinfo>
|
||||
#include <ios>
|
||||
#include <boost/exception/detail/object_hex_dump.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace
|
||||
boost
|
||||
@ -41,6 +40,23 @@ boost
|
||||
{
|
||||
return s(x);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static
|
||||
std::string
|
||||
convert( T const & x, std::string s )
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static
|
||||
std::string
|
||||
convert( T const & x, char const * s )
|
||||
{
|
||||
BOOST_ASSERT(s!=0);
|
||||
return s;
|
||||
}
|
||||
};
|
||||
|
||||
namespace
|
||||
@ -58,15 +74,7 @@ boost
|
||||
std::string
|
||||
string_stub_dump( T const & x )
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << "[ type: " << typeid(x).name() << ", size: " << sizeof(T) << ", dump: ";
|
||||
size_t n=sizeof(T)>16?16:sizeof(T);
|
||||
s.fill('0');
|
||||
s.width(2);
|
||||
for( unsigned char const * b=reinterpret_cast<unsigned char const *>(&x),* e=b+n; b!=e; ++b )
|
||||
s << std::setw(2) << std::hex << (unsigned int)*b << " ";
|
||||
s << "]";
|
||||
return s.str();
|
||||
return "[ " + exception_detail::object_hex_dump(x) + " ]";
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,13 +91,6 @@ boost
|
||||
{
|
||||
return exception_detail::to_string_dispatch::dispatch(x,s);
|
||||
}
|
||||
|
||||
template <class T,class U>
|
||||
std::string
|
||||
to_string( std::pair<T,U> const & x )
|
||||
{
|
||||
return std::string("(") + to_string(x.first) + ',' + to_string(x.second) + ')';
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -7,7 +7,10 @@
|
||||
|
||||
import testing ;
|
||||
|
||||
project : requirements <exception-handling>on ;
|
||||
|
||||
#to_string
|
||||
|
||||
run is_output_streamable_test.cpp ;
|
||||
run has_to_string_test.cpp ;
|
||||
run to_string_test.cpp ;
|
||||
@ -15,6 +18,7 @@ run to_string_stub_test.cpp ;
|
||||
compile-fail to_string_fail.cpp ;
|
||||
|
||||
#exception
|
||||
|
||||
run cloning_test.cpp ;
|
||||
run copy_exception_test.cpp ;
|
||||
run unknown_exception_test.cpp ;
|
||||
@ -24,11 +28,15 @@ run enable_error_info_test.cpp helper1.cpp ;
|
||||
run throw_exception_test.cpp helper2.cpp ;
|
||||
run errno_test.cpp ;
|
||||
run error_info_test.cpp ;
|
||||
run diagnostic_information_test.cpp ;
|
||||
run what_test.cpp ;
|
||||
compile-fail exception_fail.cpp ;
|
||||
compile-fail throw_exception_fail.cpp ;
|
||||
|
||||
#headers
|
||||
|
||||
compile exception_ptr_hpp_test.cpp ;
|
||||
compile diagnostic_information_hpp_test.cpp ;
|
||||
compile enable_current_exception_hpp_test.cpp ;
|
||||
compile enable_error_info_hpp_test.cpp ;
|
||||
compile error_info_hpp_test.cpp ;
|
||||
|
6
test/diagnostic_information_hpp_test.cpp
Normal file
6
test/diagnostic_information_hpp_test.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/exception/diagnostic_information.hpp>
|
80
test/diagnostic_information_test.cpp
Normal file
80
test/diagnostic_information_test.cpp
Normal file
@ -0,0 +1,80 @@
|
||||
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/exception/diagnostic_information.hpp>
|
||||
#include <boost/exception/info.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
typedef boost::error_info<struct tag,int> tag_int;
|
||||
|
||||
struct
|
||||
error1:
|
||||
public std::exception
|
||||
{
|
||||
char const *
|
||||
what() const throw()
|
||||
{
|
||||
return "error1";
|
||||
}
|
||||
};
|
||||
|
||||
struct
|
||||
error2:
|
||||
public std::exception,
|
||||
public boost::exception
|
||||
{
|
||||
char const *
|
||||
what() const throw()
|
||||
{
|
||||
return "error2";
|
||||
}
|
||||
};
|
||||
|
||||
struct
|
||||
error3:
|
||||
public boost::exception
|
||||
{
|
||||
};
|
||||
|
||||
std::string
|
||||
get_diagnostic_information( std::exception const & x )
|
||||
{
|
||||
return boost::diagnostic_information(x);
|
||||
}
|
||||
|
||||
std::string
|
||||
get_what( std::exception const & x )
|
||||
{
|
||||
return x.what();
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
using namespace boost;
|
||||
{
|
||||
error1 x;
|
||||
BOOST_TEST(get_what(x)=="error1");
|
||||
std::string di=get_diagnostic_information(x);
|
||||
BOOST_TEST(di.find("type:")!=std::string::npos);
|
||||
BOOST_TEST(di.find("error1")!=std::string::npos);
|
||||
}
|
||||
{
|
||||
error2 x; x << tag_int(42);
|
||||
BOOST_TEST(get_what(x)=="error2");
|
||||
std::string di=get_diagnostic_information(x);
|
||||
BOOST_TEST(di.find("type:")!=std::string::npos);
|
||||
BOOST_TEST(di.find("error2")!=std::string::npos);
|
||||
}
|
||||
{
|
||||
error3 x;
|
||||
x << tag_int(1);
|
||||
std::string w1 = x.diagnostic_information();
|
||||
x << tag_int(2);
|
||||
std::string w2 = x.diagnostic_information();
|
||||
BOOST_TEST( w1!=w2 );
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "helper1.hpp"
|
||||
#include <boost/exception/info.hpp>
|
||||
#include <boost/exception/diagnostic_information.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
namespace
|
||||
@ -24,6 +25,11 @@ namespace
|
||||
x << test_int(42);
|
||||
throw;
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +45,8 @@ main()
|
||||
std::exception & x )
|
||||
{
|
||||
BOOST_TEST( 42==*boost::get_error_info<test_int>(x) );
|
||||
BOOST_TEST( std::string(x.what())==std::string("exception test length error") );
|
||||
BOOST_TEST( std::string(x.what())!=std::string(boost::diagnostic_information(x)) );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
|
@ -18,7 +18,7 @@ typedef boost::error_info<struct tag_test_6,non_printable> test_6;
|
||||
|
||||
struct
|
||||
test_exception:
|
||||
public boost::exception
|
||||
boost::exception
|
||||
{
|
||||
};
|
||||
|
||||
@ -110,6 +110,11 @@ test_empty()
|
||||
BOOST_TEST( dynamic_cast<test_exception *>(&x) );
|
||||
BOOST_TEST( !boost::get_error_info<test_1>(x) );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@ -121,6 +126,11 @@ test_empty()
|
||||
{
|
||||
BOOST_TEST( dynamic_cast<boost::exception *>(&x) );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -136,6 +146,12 @@ test_basic_throw_catch()
|
||||
{
|
||||
BOOST_TEST(*boost::get_error_info<test_5>(x)==std::string("test"));
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
throw_test_2();
|
||||
@ -146,6 +162,11 @@ test_basic_throw_catch()
|
||||
{
|
||||
BOOST_TEST(boost::get_error_info<test_6>(x));
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -161,6 +182,11 @@ test_catch_add_info()
|
||||
{
|
||||
BOOST_TEST(*boost::get_error_info<test_5>(x)==std::string("test"));
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -179,6 +205,11 @@ test_add_tuple()
|
||||
BOOST_TEST( *boost::get_error_info<test_1>(x)==42 );
|
||||
BOOST_TEST( *boost::get_error_info<test_2>(x)==42u );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
try
|
||||
{
|
||||
throw test_exception() << test_123(42,42u,42.0f);
|
||||
@ -190,6 +221,11 @@ test_add_tuple()
|
||||
BOOST_TEST( *boost::get_error_info<test_2>(x)==42u );
|
||||
BOOST_TEST( *boost::get_error_info<test_3>(x)==42.0f );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
try
|
||||
{
|
||||
throw test_exception() << test_1235(42,42u,42.0f,std::string("42"));
|
||||
@ -202,6 +238,11 @@ test_add_tuple()
|
||||
BOOST_TEST( *boost::get_error_info<test_3>(x)==42.0f );
|
||||
BOOST_TEST( *boost::get_error_info<test_5>(x)=="42" );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
6
test/exception_ptr_hpp_test.cpp
Normal file
6
test/exception_ptr_hpp_test.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/exception_ptr.hpp>
|
@ -16,7 +16,7 @@ boost
|
||||
void
|
||||
throw_length_error()
|
||||
{
|
||||
throw enable_error_info( std::length_error("my length error") );
|
||||
throw enable_error_info( std::length_error("exception test length error") );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,10 @@ main()
|
||||
catch(
|
||||
boost::unknown_exception & x )
|
||||
{
|
||||
BOOST_TEST( 42==*boost::get_error_info<test>(x) );
|
||||
if( boost::shared_ptr<int const> d=boost::get_error_info<test>(x) )
|
||||
BOOST_TEST( 42==*d );
|
||||
else
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
@ -64,7 +67,10 @@ main()
|
||||
catch(
|
||||
boost::exception & x )
|
||||
{
|
||||
BOOST_TEST( 42==*boost::get_error_info<test>(x) );
|
||||
if( boost::shared_ptr<int const> d=boost::get_error_info<test>(x) )
|
||||
BOOST_TEST( 42==*d );
|
||||
else
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
|
@ -3,25 +3,30 @@
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/exception/info.hpp>
|
||||
#include <boost/exception/exception.hpp>
|
||||
#include <exception>
|
||||
#include <string>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
typedef boost::error_info<struct tag_test,int> test;
|
||||
|
||||
class
|
||||
my_exception:
|
||||
public boost::exception
|
||||
struct
|
||||
test_exception:
|
||||
std::exception,
|
||||
boost::exception
|
||||
{
|
||||
char const *
|
||||
what() const throw()
|
||||
{
|
||||
return "test_exception";
|
||||
}
|
||||
};
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
my_exception x;
|
||||
x << test(1);
|
||||
std::string w1 = x.what();
|
||||
x << test(2);
|
||||
std::string w2 = x.what();
|
||||
BOOST_TEST( w1!=w2 );
|
||||
test_exception x;
|
||||
std::exception & sx(x);
|
||||
boost::exception & bx(x);
|
||||
BOOST_TEST(std::string(sx.what())=="test_exception");
|
||||
BOOST_TEST(std::string(bx.what())=="test_exception");
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user