<p>This function is designed to be used directly in a throw-expression to enable the <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> support in Boost Exception. For example:</p>
<p>Unless <spanclass="RenoLink">enable_current_exception</span> is called at the time an exception object is used in a throw-expression, an attempt to copy it using <spanclass="RenoLink"><ahref="current_exception.html">current_exception</a></span> may return an <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> which refers to an instance of <spanclass="RenoLink"><ahref="unknown_exception.html">unknown_exception</a></span>. See <spanclass="RenoLink"><ahref="current_exception.html">current_exception</a></span> for details.</p>
<p>Instead of using the throw keyword directly, it is preferable to call boost::<spanclass="RenoLink"><ahref="throw_exception.html">throw_exception</a></span>. This is guaranteed to throw an exception that derives from boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span> and supports the <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> functionality.</p>
See also: <spanclass="RenoPageList"><ahref="boost-exception.html">Boost Exception</a> | <ahref="boost_exception_enable_current_exception_hpp.html">boost/exception/enable_current_exception.hpp</a> | <ahref="configuration_macros.html">Configuration Macros</a> | <ahref="copy_exception.html">copy_exception</a> | <ahref="current_exception.html">current_exception</a> | <ahref="tutorial_exception_ptr.html">Transporting of Exceptions Between Threads</a></span>