3rdParty/boost/1.78.0/libs/exception/doc/current_exception.html
#include <boost/exception_ptr.hpp>
namespace
boost
{[exception\_ptr](exception_ptr.html) current\_exception();}
The current_exception function must not be called outside of a catch block.
In addition, to safely copy an exception from one thread to another, if the exception object is copied by current_exception or copy_exception, the two copies must not have shared state. Exceptions that have value-type semantics (as well as the boost::exception type itself) satisfy this requirement.
Nothing.
It is unspecified whether the return values of two successive calls to current_exception refer to the same exception object.
Correct implementation of current_exception may require compiler support (e.g. C++11 std::current_exception() is used when available, as specified by Boost.Config BOOST_NO_CXX11_HDR_EXCEPTION), unless enable_current_exception was used at the time the currently handled exception object was passed to throw. Whenever current_exception fails to properly copy the current exception object, it returns an exception_ptr to an object of type that is as close as possible to the original exception type, using unknown_exception as a final fallback. All such types derive from boost::exception, and:
See also: Boost Exception | boost/exception_ptr.hpp | copy_exception | enable_current_exception | Frequently Asked Questions | original_exception_type | unknown_exception
Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.
Distributed under the Boost Software License, Version 1.0.