parsing_error_message.qbk 561 B

12345678910111213141516171819202122
  1. [#parsing_error_message]
  2. [section Parsing error message]
  3. A ['parsing error message] is a
  4. [link metaprogramming_value template metaprogramming value] with a
  5. `static std::string get_value()` member function. This function returns the
  6. pretty-printed version of the error the class represents. For example:
  7. struct example_error
  8. {
  9. using type = example_error;
  10. static std::string get_value()
  11. {
  12. return "This is a formatted example error."
  13. }
  14. };
  15. Failing [link parser parser]s return parsing error messages as error messages.
  16. [endsect]