# Boost Exception

### operator<</exception

#include <boost/exception/info.hpp>

    namespace
    boost
        {
        template <class E, class Tag, class T>
        E const & operator<<( E const & x, error_info<Tag,T> const & v );
        }

#### Requirements:

E must be boost::exception, or a type that derives (indirectly) from boost::exception.

#### Effects:

Stores a copy of v into x. If x already contains data of type error_info<Tag,T>, that data is overwritten.

#### Returns:

x.

#### Throws:

std::bad_alloc, or any exception emitted by the T copy constructor.

### See Also:

BOOST_ERROR_INFO
Boost Exception
boost/exception/info.hpp
Diagnostic Information
error_info
exception
exception::diagnostic_information
exception::exception
get_error_info
Integrating Boost Exception in Existing Exception Class Hierarchies