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>
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 | ) |
|
|
virtual |
◆ on_warning()
void xml::error_messages::on_warning |
( |
const std::string & |
msg | ) |
|
|
virtual |
◆ 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: