retdec
Public Member Functions | Private Attributes | List of all members
retdec::config::ParseException Class Reference

#include <config_exceptions.h>

Inheritance diagram for retdec::config::ParseException:
Inheritance graph
[legend]
Collaboration diagram for retdec::config::ParseException:
Collaboration graph
[legend]

Public Member Functions

 ParseException (const std::string &message, std::size_t line, std::size_t column)
 
std::string getMessage () const
 
std::size_t getLine () const
 
std::size_t getColumn () const
 
virtual const char * what () const noexcept override
 

Private Attributes

std::string _message
 Error message. More...
 
std::size_t _line = 0
 Line in JSON where error occurred. More...
 
std::size_t _column = 0
 Column in JSON where error occurred. More...
 
std::string _whatMessage
 Message returned by what() method. More...
 

Detailed Description

Config exception which can be thrown to the outside world (library users). It represents an error during JSON parsing. It contains an error message and line and column in JSON where error occurred.

Constructor & Destructor Documentation

◆ ParseException()

retdec::config::ParseException::ParseException ( const std::string &  message,
std::size_t  line,
std::size_t  column 
)
inline

Member Function Documentation

◆ getColumn()

std::size_t retdec::config::ParseException::getColumn ( ) const
inline

◆ getLine()

std::size_t retdec::config::ParseException::getLine ( ) const
inline

◆ getMessage()

std::string retdec::config::ParseException::getMessage ( ) const
inline

◆ what()

virtual const char* retdec::config::ParseException::what ( ) const
inlineoverridevirtualnoexcept
Returns
Single throw message constructed from error message and error line and column in JSON.

Member Data Documentation

◆ _column

std::size_t retdec::config::ParseException::_column = 0
private

Column in JSON where error occurred.

◆ _line

std::size_t retdec::config::ParseException::_line = 0
private

Line in JSON where error occurred.

◆ _message

std::string retdec::config::ParseException::_message
private

Error message.

◆ _whatMessage

std::string retdec::config::ParseException::_whatMessage
private

Message returned by what() method.


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