<div><ul><li> An <spanclass="RenoLink"><ahref="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 <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> that refers to an instance of std::bad_alloc.</li>
<div><ul><li> It is unspecified whether the return values of two successive calls to <spanclass="RenoLink">current_exception</span> refer to the same exception object.</li>
<li> Correct implementation of <spanclass="RenoLink">current_exception</span> may require compiler support, unless <spanclass="RenoLink"><ahref="enable_current_exception.html">enable_current_exception</a></span> was used at the time the currently handled exception object was passed to throw. Whenever <spanclass="RenoLink">current_exception</span> fails to properly copy the current exception object, it returns an <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> to an object of type that is as close as possible to the original exception type, using <spanclass="RenoLink"><ahref="unknown_exception.html">unknown_exception</a></span> as a final fallback. All such types derive from boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span>, and:<div><ul><li> if the original exception object derives from boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span>, then the boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span> sub-object of the object referred to by the returned <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> is initialized by the boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span> copy constructor;</li>
<li> if available, the exception contains the std::type_info of the original exception object, accessible through <spanclass="RenoLink"><ahref="get_error_info.html">get_error_info</a></span><<spanclass="RenoLink"><ahref="original_exception_type.html">original_exception_type</a></span>>.</li>