The xml::error_messages class is used to store all the error messages which are collected while parsing or validating an XML document.
More...
#include <errors.h>
|
| const messages_type & | messages () const |
| | Get the error messages.
|
| |
| bool | empty () const |
| | Convenience function to find if there are any messages at all.
|
| |
| bool | has_warnings () const |
| | Check if there are warnings in the error messages.
|
| |
| bool | has_errors () const |
| | Check if there are any errors.
|
| |
| std::string | print () const |
| | Convert error messages into a single printable string.
|
| |
| void | on_error (const std::string &msg) override |
| | Called by xmlwrapp to report an error.
|
| |
| void | on_warning (const std::string &msg) override |
| | Called by xmlwrapp to report a warning.
|
| |
The xml::error_messages class is used to store all the error messages which are collected while parsing or validating an XML document.
- Since
- 0.7.0
◆ messages_type
A type to store multiple messages.
◆ empty()
| bool xml::error_messages::empty |
( |
| ) |
const |
|
inline |
Convenience function to find if there are any messages at all.
◆ format_for_print()
| virtual std::string xml::error_messages::format_for_print |
( |
const error_message & |
msg | ) |
const |
|
protectedvirtual |
Called by print() to format a single message.
◆ has_errors()
| bool xml::error_messages::has_errors |
( |
| ) |
const |
|
inline |
Check if there are any errors.
◆ has_warnings()
| bool xml::error_messages::has_warnings |
( |
| ) |
const |
|
inline |
Check if there are warnings in the error messages.
- Returns
- true if there is at least one warning in the error messages. It does not consider errors.
◆ messages()
◆ on_error()
| void xml::error_messages::on_error |
( |
const std::string & |
msg | ) |
|
|
overridevirtual |
◆ on_warning()
| void xml::error_messages::on_warning |
( |
const std::string & |
msg | ) |
|
|
overridevirtual |
◆ print()
| std::string xml::error_messages::print |
( |
| ) |
const |
Convert error messages into a single printable string.
The returned string is typically multiline, with the messages separated with newlines ('
').
The documentation for this class was generated from the following file: