|
Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
|
An error generated when parsing fails. More...
#include <parse_error.hpp>
Public Member Functions | |
| TOML_NODISCARD_CTOR | parse_error (std::string &&desc, source_region &&src) noexcept |
| TOML_NODISCARD_CTOR | parse_error (std::string &&desc, const source_region &src) noexcept |
| TOML_NODISCARD_CTOR | parse_error (std::string &&desc, const source_position &position, const source_path_ptr &path={}) noexcept |
| TOML_NODISCARD std::string_view | description () const noexcept |
| Returns a textual description of the error. | |
| TOML_NODISCARD const source_region & | source () const noexcept |
| Returns the region of the source document responsible for the error. | |
Friends | |
| std::ostream & | operator<< (std::ostream &lhs, const parse_error &rhs) |
| Prints a parse_error to a stream. | |
An error generated when parsing fails.
Definition at line 28 of file parse_error.hpp.
|
inlinenoexcept |
Returns a textual description of the error.
Definition at line 74 of file parse_error.hpp.
|
inlinenoexcept |
Definition at line 65 of file parse_error.hpp.
|
inlinenoexcept |
Definition at line 61 of file parse_error.hpp.
|
inlinenoexcept |
Definition at line 57 of file parse_error.hpp.
|
inlinenoexcept |
Returns the region of the source document responsible for the error.
Definition at line 84 of file parse_error.hpp.
|
friend |
Prints a parse_error to a stream.
\detail \cpp try { auto tbl = toml::parse("enabled = trUe"sv); } catch (const toml::parse_error & err) { std::cerr << "Parsing failed:\n"sv << err << "\n"; } \ecpp
\out Parsing failed: Encountered unexpected character while parsing boolean; expected 'true', saw 'trU' (error occurred at line 1, column 13) \eout
| Char | The output stream's underlying character type. Must be 1 byte in size. |
| lhs | The stream. |
| rhs | The parse_error. |
Definition at line 110 of file parse_error.hpp.