parse_error

Defined in header: <orcus/exception.hpp>

class parse_error : public orcus::general_error

Exception related to a parsing error that includes an offset in the stream where the error occurred.

Subclassed by orcus::malformed_xml_error

Public Functions

parse_error(std::string msg, std::ptrdiff_t offset)
std::ptrdiff_t offset() const

Get the offset in a stream associated with the error.

Returns:

offset in a stream where the error occurred.

Public Static Functions

static void throw_with(std::string_view msg_before, char c, std::string_view msg_after, std::ptrdiff_t offset)
static void throw_with(std::string_view msg_before, std::string_view msg, std::string_view msg_after, std::ptrdiff_t offset)