Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::sources::basic_exception_handler_logger< BaseT > Class Template Reference

Exception handler feature implementation. More...

#include <exception_handler_feature.hpp>

Inheritance diagram for boost::sources::basic_exception_handler_logger< BaseT >:
Collaboration diagram for boost::sources::basic_exception_handler_logger< BaseT >:

Public Types

typedef base_type::threading_model threading_model
 Threading model being used. More...
 
typedef base_type::final_type final_type
 Final logger type. More...
 
typedef
boost::log::aux::light_function
< void() > 
exception_handler_type
 Exception handler function type. More...
 
typedef strictest_lock
< typename
base_type::swap_lock,
boost::log::aux::exclusive_lock_guard
< threading_model > >::type 
swap_lock
 Lock requirement for the swap_unlocked method. More...
 

Public Member Functions

 basic_exception_handler_logger ()
 Default constructor. More...
 
 basic_exception_handler_logger (basic_exception_handler_logger const &that)
 Copy constructor. More...
 
 basic_exception_handler_logger (BOOST_RV_REF(basic_exception_handler_logger) that)
 Move constructor. More...
 
template<typename ArgsT >
 basic_exception_handler_logger (ArgsT const &args)
 Constructor with arguments. More...
 
template<typename HandlerT >
void set_exception_handler (HandlerT const &handler)
 The method sets exception handler function. More...
 

Protected Member Functions

template<typename ArgsT >
record open_record_unlocked (ArgsT const &args)
 Unlocked open_record. More...
 
void push_record_unlocked (BOOST_RV_REF(record) rec)
 Unlocked push_record. More...
 
void swap_unlocked (basic_exception_handler_logger &that)
 Unlocked swap. More...
 

Detailed Description

template<typename BaseT>
class boost::sources::basic_exception_handler_logger< BaseT >

Exception handler feature implementation.

Member Typedef Documentation

template<typename BaseT >
typedef boost::log::aux::light_function< void () > boost::sources::basic_exception_handler_logger< BaseT >::exception_handler_type

Exception handler function type.

template<typename BaseT >
typedef base_type::final_type boost::sources::basic_exception_handler_logger< BaseT >::final_type

Final logger type.

template<typename BaseT >
typedef strictest_lock< typename base_type::swap_lock, boost::log::aux::exclusive_lock_guard< threading_model > >::type boost::sources::basic_exception_handler_logger< BaseT >::swap_lock

Lock requirement for the swap_unlocked method.

template<typename BaseT >
typedef base_type::threading_model boost::sources::basic_exception_handler_logger< BaseT >::threading_model

Threading model being used.

Constructor & Destructor Documentation

Default constructor.

The constructed logger does not have an exception handler.

template<typename BaseT >
boost::sources::basic_exception_handler_logger< BaseT >::basic_exception_handler_logger ( basic_exception_handler_logger< BaseT > const &  that)
inline

Copy constructor.

Move constructor.

template<typename BaseT >
template<typename ArgsT >
boost::sources::basic_exception_handler_logger< BaseT >::basic_exception_handler_logger ( ArgsT const &  args)
inlineexplicit

Constructor with arguments.

Passes arguments to other features.

Member Function Documentation

template<typename BaseT >
template<typename ArgsT >
record boost::sources::basic_exception_handler_logger< BaseT >::open_record_unlocked ( ArgsT const &  args)
inlineprotected

Unlocked open_record.

References boost::expressions::record.

template<typename BaseT >
void boost::sources::basic_exception_handler_logger< BaseT >::push_record_unlocked ( BOOST_RV_REF(record rec)
inlineprotected

Unlocked push_record.

References boost::move().

template<typename BaseT >
template<typename HandlerT >
void boost::sources::basic_exception_handler_logger< BaseT >::set_exception_handler ( HandlerT const &  handler)
inline

The method sets exception handler function.

The function will be called with no arguments in case if an exception occurs during either open_record or push_record method execution. Since exception handler is called from a catch statement, the exception can be rethrown in order to determine its type.

By default no handler is installed, thus any exception is propagated as usual.

See also
utility/exception_handler.hpp
Parameters
handlerException handling function
Note
The exception handler can be invoked in several threads concurrently.
Thread interruptions are not affected by exception handlers.

References boost::lock().

template<typename BaseT >
void boost::sources::basic_exception_handler_logger< BaseT >::swap_unlocked ( basic_exception_handler_logger< BaseT > &  that)
inlineprotected

Unlocked swap.


The documentation for this class was generated from the following file: