ParseError Class Reference

Ratpac-two: RAT::ParseError Class Reference
Ratpac-two
RAT::ParseError Class Reference

#include <DBExceptions.hh>

Inheritance diagram for RAT::ParseError:
RAT::TextLoaderError RAT::ProbablyJSONParseError

Public Member Functions

 ParseError (int lnum, int cnum, std::string l, std::string mes)
 
std::string GetFull () const
 
bool operator== (const ParseError &other) const
 

Public Attributes

int linenum
 
int colnum
 
std::string line
 
std::string message
 

Detailed Description

Exception: Error parsing RATDB text file

Constructor & Destructor Documentation

◆ ParseError()

RAT::ParseError::ParseError ( int  lnum,
int  cnum,
std::string  l,
std::string  mes 
)
inline

Create new parse error.

Parameters
lnumLine number in text file where error occurred.
colnumColumn number in text file where error occurred.
lContents of erroneous line from file.
mesMessage explaining specific error.

Member Function Documentation

◆ GetFull()

std::string RAT::ParseError::GetFull ( ) const
inline

Return formatted string explaining parse error.

This method creates a user-readable string which shows where the error ocurred and the problem line.

◆ operator==()

bool RAT::ParseError::operator== ( const ParseError other) const
inline

Compare equality between two ParseError objects by comparing all fields.

Member Data Documentation

◆ colnum

int RAT::ParseError::colnum

Column number of error.

◆ line

std::string RAT::ParseError::line

Line containing error.

◆ linenum

int RAT::ParseError::linenum

Line number of error.

◆ message

std::string RAT::ParseError::message

Message explaining error.


The documentation for this class was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/db/include/RAT/DBExceptions.hh