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 for the latest Boost documentation.
PrevUpHomeNext

Class template nothrow_exception_handler

boost::log::nothrow_exception_handler

Synopsis

// In header: <boost/log/utility/exception_handler.hpp>

template<typename SequenceT, typename HandlerT> 
class nothrow_exception_handler :
  public boost::log::exception_handler< SequenceT, HandlerT >
{
public:
  // types
  typedef HandlerT handler_type;  // The exception handler type. 
  typedef void     result_type;   // The handler result type. 

  // construct/copy/destruct
  explicit nothrow_exception_handler(handler_type const &);

  // public member functions
  void operator()() const;
};

Description

A no-throw exception handler functional object. Acts similar to exception_handler, but in case if the exception cannot be handled the exception is not propagated from the handler. Instead the user-defined functional object is called with no parameters.

nothrow_exception_handler public construct/copy/destruct

  1. explicit nothrow_exception_handler(handler_type const & handler);

    Initializing constructor. Creates an exception handler with the specified function object that will receive the exception.

nothrow_exception_handler public member functions

  1. void operator()() const;

    Exception launcher. Rethrows the current exception in order to detect its type and pass it to the aggregated function object. If the type of the exception could not be detected, the user-defined handler is called with no arguments.

    [Note] Note

    Must be called from within a catch statement.


PrevUpHomeNext