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

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.

References numEval::NUMERIC_EVALUATOR::m_parseFinished.

140  {
141  m_parseFinished = true;
142  return true;
143  }
144 
145  do
146  {
147  tok = getToken();
148  numEval::Parse( m_parser, tok.token, tok.value, this );
149 
void Parse(void *yyp, int yymajor, ParseTOKENTYPE yyminorParseARG_PDECL)
numEval::PARSE_ERROR::~PARSE_ERROR ( )
throw (
)
inline

Definition at line 156 of file numeric_evaluator.cpp.

numEval::PARSE_ERROR::PARSE_ERROR ( )
inlineprotected

Definition at line 159 of file numeric_evaluator.cpp.

Member Function Documentation

void numEval::IO_ERROR::init ( const wxString &  aProblem,
const char *  aThrowersFile,
const char *  aThrowersFunction,
int  aThrowersLineNumber 
)
inherited
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 
)
virtual const wxString numEval::IO_ERROR::Problem ( ) const
virtualinherited

what was the problem?

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

A composite of Problem() and Where()

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

where did the Problem() occur?

Member Data Documentation

int numEval::PARSE_ERROR::byteIndex

at which byte offset within the line, 1 based index

Definition at line 127 of file numeric_evaluator.cpp.

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.

int numEval::PARSE_ERROR::lineNumber

at which line number, 1 based index.

Definition at line 126 of file numeric_evaluator.cpp.

wxString numEval::IO_ERROR::problem
protectedinherited

Definition at line 112 of file numeric_evaluator.cpp.

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: