Orcus
Loading...
Searching...
No Matches
orcus::parse_error Class Reference

#include <exception.hpp>

Inheritance diagram for orcus::parse_error:
orcus::general_error orcus::malformed_xml_error

Public Member Functions

 parse_error (std::string msg, std::ptrdiff_t offset)
 
std::ptrdiff_t offset () const
 
- Public Member Functions inherited from orcus::general_error
 general_error (std::string msg)
 
 general_error (std::string_view cls, std::string_view msg)
 
virtual const char * what () const noexcept
 

Static Public Member 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)
 

Protected Member Functions

 parse_error (std::string_view cls, std::string_view msg, std::ptrdiff_t offset)
 offset in the stream where the error occurred.
 
- Protected Member Functions inherited from orcus::general_error
void append_msg (const std::string &s)
 

Detailed Description

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

Member Function Documentation

◆ offset()

std::ptrdiff_t orcus::parse_error::offset ( ) const

Get the offset in a stream associated with the error.

Returns
offset in a stream where the error occurred.