Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Boost Exception

current_exception_cast

#include <boost/exception/current_exception_cast.hpp>

namespace
boost
    {
    template <class E>
    E * current_exception_cast();
    }

Requirements:

This function must not be called outside of a catch block.

Returns:

A pointer of type E to the current exception object, or null if the current exception object can not be converted to E *.

Throws:

Nothing.