Parsnip
parsing library
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes
Parsnip::Exception Class Reference

Class representing issues related to serialization & parsing. More...

#include <parsnip.h>

Inheritance diagram for Parsnip::Exception:
Parsnip::DataFormatError Parsnip::DataRangeError Parsnip::DuplicateOption Parsnip::IncompleteCommand Parsnip::IncorrectDataType Parsnip::IncorrectListSize Parsnip::InvalidKey Parsnip::InvalidSchema Parsnip::InvalidValue Parsnip::NoSchemaDefined Parsnip::NoSuchKey Parsnip::NotNumeric Parsnip::NumberOutOfRange Parsnip::RunOnCommand Parsnip::SchemaConflict

Public Member Functions

virtual const char * what () const noexcept override
 
const char * where () const noexcept
 Retrieve the exception location information.
 
void addBacktraceLocation (const std::string &)
 Insert a new portion of the exception location at the front.
 

Protected Member Functions

 Exception (const std::string &why)
 Construct an exception.
 
 Exception (const std::string &why, const std::string &detail)
 Construct an exception.
 

Protected Attributes

std::string reason
 Storage for the exception explanation.
 

Detailed Description

Class representing issues related to serialization & parsing.

Constructor & Destructor Documentation

◆ Exception()

Parsnip::Exception::Exception ( const std::string &  why,
const std::string &  detail 
)
inlineprotected

Construct an exception.

Parameters
whyThe primary explanation for the error.
detailSpecifics about the error, such as the problem location or data.

Member Function Documentation

◆ addBacktraceLocation()

void Parsnip::Exception::addBacktraceLocation ( const std::string &  where)

Insert a new portion of the exception location at the front.

Parameters
whereThe location portion.

◆ where()

const char * Parsnip::Exception::where ( ) const
inlinenoexcept

Retrieve the exception location information.

Returns
A string containing location information, or a nullptr if none is available.

The documentation for this class was generated from the following files: