...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::exception_handler
// In header: <boost/log/utility/exception_handler.hpp> template<typename SequenceT, typename HandlerT> class exception_handler : public type { public: // types typedef HandlerT handler_type; // The exception handler type. typedef void result_type; // The handler result type. // public member functions explicit exception_handler(handler_type const &); void operator()() const; };
An exception handler functional object. The handler aggregates a user-defined functional object that will be called when one of the specified exception types is caught.
exception_handler
public member functionsexplicit exception_handler(handler_type const & handler);
Initializing constructor. Creates an exception handler with the specified function object that will receive the exception.
void operator()() const;
Exception launcher. Rethrows the current exception in order to detect its type and pass it to the aggregated function object.
![]() |
Note |
---|---|
Must be called from within a |