Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct default_error_handler

boost::parser::default_error_handler

Synopsis

// In header: <boost/parser/error_handling_fwd.hpp>


struct default_error_handler {

  // public member functions
  () = ;
  template<typename Iter, typename Sentinel> 
     
    (, , parse_error< ) ;
  template<typename Context, typename Iter> 
     (, , , ) ;
  template<typename Context> 
     (, , ) ;
};

Description

The error handler used when the user does not specify a custom one. This error handler prints warnings and errors to std::cerr, and does not have an associcated filename.

default_error_handler public member functions

  1. () = ;
  2. template<typename Iter, typename Sentinel> 
       
      ( first,  last, parse_error<  e) ;

    Handles a parse_error exception thrown during parsing. A formatted parse-expectation failure is printed to std::cerr. Always returns error_handler_result::fail.

  3. template<typename Context, typename Iter> 
       ( kind,  message, 
                     context,  it) ;

    Prints message to std::cerr. The diagnostic is printed with the given kind, indicating the location as being at it. This must be called within a parser semantic action, providing the parse context.

  4. template<typename Context> 
       ( kind,  message, 
                     context) ;

    Prints message to std::cerr. The diagnostic is printed with the given kind, at no particular location. This must be called within a parser semantic action, providing the parse context.


PrevUpHomeNext