xmlwrapp Lightweight C++ XML parsing library

Public Member Functions | List of all members
xml::error_handler Class Referenceabstract

The xml::error_handler class is used to handle libxml2 errors and warnings emitted during parsing, validation etc. More...

`#include <errors.h>`

Inheritance diagram for xml::error_handler:
[legend]

## Public Member Functions
virtual void | on_error (const std::string &msg)=0
| Called by xmlwrapp to report an error. More...
virtual void | on_warning (const std::string &msg)=0
| Called by xmlwrapp to report a warning. More...

## Detailed Description

The xml::error_handler class is used to handle libxml2 errors and warnings emitted during parsing, validation etc.

Although you can derive a custom handler from it, the specializations included in xmlwrapp should suffice for most uses: throw_on_error and throw_on_error_or_warning throw on issues, error_messages collects errors and warnings without throwing.

Since
  0.7.0

## Member Function Documentation

## ◆ on_error()

virtual void xml::error_handler::on_error | ( | const std::string & | msg | ) |
| pure virtual

Called by xmlwrapp to report an error.

Implemented in xml::error_messages, xml::error_handler_throw_on_error, and xml::error_handler_ignore_errors.

## ◆ on_warning()

virtual void xml::error_handler::on_warning | ( | const std::string & | msg | ) |
| pure virtual

Called by xmlwrapp to report a warning.

Implemented in xml::error_messages, xml::error_handler_throw_on_error_or_warning, xml::error_handler_throw_on_error, and xml::error_handler_ignore_errors.

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

- xmlwrapp/errors.h