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 to view this page for the latest version.
PrevUpHomeNext

Struct fallback_to_throw

boost::log::fallback_to_throw

Synopsis

// In header: <boost/log/attributes/fallback_policy.hpp>


struct fallback_to_throw {

  enum @1 { guaranteed_result = = true };

  // public static functions
  template<typename FunT> static bool apply_default(FunT &);
  template<typename FunT> static bool apply_default(FunT const &);
  static void on_invalid_type(typeindex::type_index const &);
  static void on_missing_value();
};

Description

The fallback_to_throw policy results in throwing an exception if the attribute value cannot be extracted.

fallback_to_throw public static functions

  1. template<typename FunT> static bool apply_default(FunT &);

    The method is called in order to apply a function object to the default value.

  2. template<typename FunT> static bool apply_default(FunT const &);

    The method is called in order to apply a function object to the default value.

  3. static void on_invalid_type(typeindex::type_index const & t);

    The method is called when value extraction failed because the attribute value has different type than requested.

  4. static void on_missing_value();

    The method is called when value extraction failed because the attribute value was not found.


PrevUpHomeNext