Boost Exception

diagnostic_information_what

#include <boost/exception/diagnostic_information.hpp> 

namespace
boost
    {
    char const * diagnostic_information_what( boost::exception const & e ) throw();
    }

The diagnostic_information_what function is intended to be called from a user-defined std::exception::what() override. This allows diagnostic information to be returned as the what() string.

Returns:

A pointer to a zero-terminated buffer that contains a string similar to the std::string returned by the diagnostic_information function, or null to indicate a failure.

Throws:

Nothing.

Note:

The returned pointer becomes invalid if any error_info is modified or added to the exception object, or if another diagnostic information function is called.