metaparse/doc/parsing_error_message.qbk
2015-07-19 09:53:35 +02:00

23 lines
561 B
Plaintext

[#parsing_error_message]
[section Parsing error message]
A ['parsing error message] is a
[link metaprogramming_value template metaprogramming value] with a
`static std::string get_value()` member function. This function returns the
pretty-printed version of the error the class represents. For example:
struct example_error
{
using type = example_error;
static std::string get_value()
{
return "This is a formatted example error."
}
};
Failing [link parser parser]s return parsing error messages as error messages.
[endsect]