56 message_type_(msg_type), message_(message),
57 line_(line), filename_(filename)
78 message_type_(other.message_type_),
79 message_(std::move(other.message_)),
81 filename_(std::move(other.filename_))
88 message_ = std::move(other.message_);
113 if (k->get_message_type() ==
type)
136 for (error_messages_type::const_iterator k(begin); k != end; ++k) {
139 ": " + k->get_message();
149 for (error_messages_type::const_iterator k = other.
get_messages().begin();
The xml::error_message class is used to store a single error message which may appear while parsing o...
std::string get_message(void) const
Get the error message.
message_type
A type for different type of errors.
@ type_fatal_error
fatal error
message_type message_type_
error_message & operator=(const error_message &&other)
Moving assignment.
error_message(const std::string &message, message_type msg_type, long line, const std::string &filename)
Create a new xml::error_message object.
std::string get_filename(void) const
Get the file name.
static std::string message_type_str(message_type mt)
Convert an error type to a string.
long get_line(void) const
Get the line number.
message_type get_message_type(void) const
Get the error message type.
The xml::error_messages class is used to store all the error message which are collected while parsin...
void append_messages(const error_messages &other)
Appends the messages from the other container.
bool has_fatal_errors(void) const
Check if there are fatal errors in the error messages.
const error_messages_type & get_messages(void) const
Get the error messages.
std::list< error_message > error_messages_type
A type to store multiple messages.
bool has_warnings(void) const
Check if there are warnings in the error messages.
bool has_errors(void) const
Check if there are errors in the error messages.
std::string print(void) const
Convert error messages into a single printable string.
error_messages_type error_messages_
bool has_messages_of_type(error_message::message_type type) const
This exception class is thrown by xmlwrapp for all runtime XML-related errors along with the xml::par...
virtual const char * what() const noexcept
Convert error messages into a printable C-style string.
parser_exception(const error_messages &msgs)
Create a new object using the given list of error messages.
const error_messages & get_messages(void) const
Get error messages.
Various XML parser's and validator's errors related code for XmlWrapp.
This file contains the definition of the xml::exception class.