![]() |
Home | Libraries | People | FAQ | More |
boost::parser::stream_error_handler
// In header: <boost/parser/error_handling_fwd.hpp> struct stream_error_handler { // public member functions (); (); (, ); (, , ); (); (, ); (, , ); template<typename Iter, typename Sentinel> (Iter, Sentinel, parse_error< Iter > const &) ; template<typename Context, typename Iter> void (, , Context const &, Iter) ; template<typename Context> void (, , Context const &) ; };
Prints warnings and errors to the std::ostream
s provided by the user, or std::cerr
if neither stream is specified. If a filename is provided, that is used to print all diagnostics.
stream_error_handler
public member functions();
( filename);
( filename, errors);
( filename, errors, warnings);
( filename);
This overload is Windows-only.
( filename, errors);
This overload is Windows-only.
( filename, errors, warnings);
This overload is Windows-only.
template<typename Iter, typename Sentinel> (Iter first, Sentinel last, parse_error< Iter > const & e) ;
Handles a parse_error
exception thrown during parsing. A formatted parse-expectation failure is printed to *err_os_
when err_os_
is non-null, or std::cerr
otherwise. Always returns error_handler_result::fail
.
template<typename Context, typename Iter> void ( kind, message, Context const & context, Iter it) ;
Let std::ostream * s = kind == diagnostic_kind::error : err_os_ : warn_os_
; prints message
to *s
when s
is non-null, or std::cerr
otherwise. 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.
template<typename Context> void ( kind, message, Context const & context) ;
Let std::ostream * s = kind == diagnostic_kind::error : err_os_ : warn_os_
; prints message
to *s
when s
is non-null, or std::cerr
otherwise. 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.