KiCad PCB EDA Suite
numEval::PARSE_ERROR Struct Reference

Struct PARSE_ERROR contains a filename or source description, a problem input line, a line number, a byte offset, and an error message which contains the the caller's report and his call site information: CPP source file, function, and line number. More...

Inheritance diagram for numEval::PARSE_ERROR:
numEval::IO_ERROR numEval::FUTURE_FORMAT_ERROR

Public Member Functions

 PARSE_ERROR (const wxString &aProblem, const char *aThrowersFile, const char *aThrowersFunction, int aThrowersLineNumber, const wxString &aSource, const char *aInputLine, int aLineNumber, int aByteIndex)
 Constructor which is normally called via the macro THROW_PARSE_ERROR so that FILE and FUNCTION and LINE can be captured from the call site. More...
 
void init (const wxString &aProblem, const char *aThrowersFile, const char *aThrowersFunction, int aThrowersLineNumber, const wxString &aSource, const char *aInputLine, int aLineNumber, int aByteIndex)
 
 ~PARSE_ERROR () throw ()
 
void init (const wxString &aProblem, const char *aThrowersFile, const char *aThrowersFunction, int aThrowersLineNumber)
 
virtual const wxString Problem () const
 what was the problem? More...
 
virtual const wxString Where () const
 where did the Problem() occur? More...
 
virtual const wxString What () const
 A composite of Problem() and Where() More...
 

Public Attributes

int lineNumber
 at which line number, 1 based index. More...
 
int byteIndex
 at which byte offset within the line, 1 based index More...
 
std::string inputLine
 problem line of input [say, from a LINE_READER]. More...
 

Protected Member Functions

 PARSE_ERROR ()
 

Protected Attributes

wxString problem
 
wxString where
 

Detailed Description

Struct PARSE_ERROR contains a filename or source description, a problem input line, a line number, a byte offset, and an error message which contains the the caller's report and his call site information: CPP source file, function, and line number.

Author
Dick Hollenbeck

Definition at line 124 of file numeric_evaluator.cpp.

Constructor & Destructor Documentation

◆ PARSE_ERROR() [1/2]

numEval::PARSE_ERROR::PARSE_ERROR ( const wxString &  aProblem,
const char *  aThrowersFile,
const char *  aThrowersFunction,
int  aThrowersLineNumber,
const wxString &  aSource,
const char *  aInputLine,
int  aLineNumber,
int  aByteIndex 
)
inline

Constructor which is normally called via the macro THROW_PARSE_ERROR so that FILE and FUNCTION and LINE can be captured from the call site.

Definition at line 140 of file numeric_evaluator.cpp.

144  {
145  tok = getToken();
146  numEval::Parse( m_parser, tok.token, tok.value, this );
147 
148  if( m_parseFinished || tok.token == ENDS )
149  {
void Parse(void *yyp, int yymajor, ParseTOKENTYPE yyminor ParseARG_PDECL)
#define ENDS

◆ ~PARSE_ERROR()

numEval::PARSE_ERROR::~PARSE_ERROR ( )
throw (
)
inline

Definition at line 156 of file numeric_evaluator.cpp.

◆ PARSE_ERROR() [2/2]

numEval::PARSE_ERROR::PARSE_ERROR ( )
inlineprotected

Definition at line 159 of file numeric_evaluator.cpp.

Member Function Documentation

◆ init() [1/2]

void numEval::IO_ERROR::init ( const wxString &  aProblem,
const char *  aThrowersFile,
const char *  aThrowersFunction,
int  aThrowersLineNumber 
)
inherited

◆ init() [2/2]

void numEval::PARSE_ERROR::init ( const wxString &  aProblem,
const char *  aThrowersFile,
const char *  aThrowersFunction,
int  aThrowersLineNumber,
const wxString &  aSource,
const char *  aInputLine,
int  aLineNumber,
int  aByteIndex 
)

◆ Problem()

virtual const wxString numEval::IO_ERROR::Problem ( ) const
virtualinherited

what was the problem?

◆ What()

virtual const wxString numEval::IO_ERROR::What ( ) const
virtualinherited

A composite of Problem() and Where()

◆ Where()

virtual const wxString numEval::IO_ERROR::Where ( ) const
virtualinherited

where did the Problem() occur?

Member Data Documentation

◆ byteIndex

int numEval::PARSE_ERROR::byteIndex

at which byte offset within the line, 1 based index

Definition at line 127 of file numeric_evaluator.cpp.

◆ inputLine

std::string numEval::PARSE_ERROR::inputLine

problem line of input [say, from a LINE_READER].

this is brought up in original byte format rather than wxString form, incase there was a problem with the encoding, in which case converting to wxString is not reliable in this context.

Definition at line 133 of file numeric_evaluator.cpp.

◆ lineNumber

int numEval::PARSE_ERROR::lineNumber

at which line number, 1 based index.

Definition at line 126 of file numeric_evaluator.cpp.

◆ problem

wxString numEval::IO_ERROR::problem
protectedinherited

Definition at line 112 of file numeric_evaluator.cpp.

◆ where

wxString numEval::IO_ERROR::where
protectedinherited

Definition at line 113 of file numeric_evaluator.cpp.


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