MADNESS
version 0.9
|
Error class of the parser. More...
#include <muParserError.h>
Public Member Functions | |
ParserError () | |
Default constructor. More... | |
ParserError (EErrorCodes a_iErrc) | |
This Constructor is used for internal exceptions only. More... | |
ParserError (const string_type &sMsg) | |
Construct an error from a message text. More... | |
ParserError (EErrorCodes a_iErrc, const string_type &sTok, const string_type &sFormula=string_type(_T("(formula is not available)")), int a_iPos=-1) | |
Construct an error object. More... | |
ParserError (EErrorCodes a_iErrc, int a_iPos, const string_type &sTok) | |
Construct an error object. More... | |
ParserError (const char_type *a_szMsg, int a_iPos=-1, const string_type &sTok=string_type()) | |
Construct an error object. More... | |
ParserError (const ParserError &a_Obj) | |
Copy constructor. More... | |
ParserError & | operator= (const ParserError &a_Obj) |
Assignment operator. More... | |
~ParserError () | |
void | SetFormula (const string_type &a_strFormula) |
Set the expression related to this error. More... | |
const string_type & | GetExpr () const |
gets the expression related tp this error. More... | |
const string_type & | GetMsg () const |
Returns the message string for this error. More... | |
std::size_t | GetPos () const |
Return the formula position related to the error. More... | |
const string_type & | GetToken () const |
Return string related with this token (if available). More... | |
EErrorCodes | GetCode () const |
Return the error code. More... | |
Error class of the parser.
Part of the math parser package.
mu::ParserError::ParserError | ( | ) |
Default constructor.
|
explicit |
This Constructor is used for internal exceptions only.
It does not contain any information but the error code.
References _T.
|
explicit |
Construct an error from a message text.
mu::ParserError::ParserError | ( | EErrorCodes | iErrc, |
const string_type & | sTok, | ||
const string_type & | sExpr = string_type(_T("(formula is not available)")) , |
||
int | iPos = -1 |
||
) |
Construct an error object.
[in] | a_iErrc | the error code. |
[in] | sTok | The token string related to this error. |
[in] | sExpr | The expression related to the error. |
[in] | a_iPos | the position in the expression where the error occured. |
References _T.
mu::ParserError::ParserError | ( | EErrorCodes | iErrc, |
int | iPos, | ||
const string_type & | sTok | ||
) |
Construct an error object.
[in] | iErrc | the error code. |
[in] | iPos | the position in the expression where the error occured. |
[in] | sTok | The token string related to this error. |
References _T.
mu::ParserError::ParserError | ( | const char_type * | szMsg, |
int | iPos = -1 , |
||
const string_type & | sTok = string_type() |
||
) |
Construct an error object.
[in] | szMsg | The error message text. |
[in] | iPos | the position related to the error. |
[in] | sTok | The token string related to this error. |
References _T.
mu::ParserError::ParserError | ( | const ParserError & | a_Obj | ) |
Copy constructor.
mu::ParserError::~ParserError | ( | ) |
EErrorCodes mu::ParserError::GetCode | ( | ) | const |
Return the error code.
const string_type & mu::ParserError::GetExpr | ( | ) | const |
gets the expression related tp this error.
const string_type & mu::ParserError::GetMsg | ( | ) | const |
Returns the message string for this error.
Referenced by ParserHandler< T, NDIM >::changeExpr(), main(), ParserHandler< T, NDIM >::operator()(), and ParserHandler< T, NDIM >::ParserHandler().
std::size_t mu::ParserError::GetPos | ( | ) | const |
Return the formula position related to the error.
If the error is not related to a distinct position this will return -1
const string_type & mu::ParserError::GetToken | ( | ) | const |
Return string related with this token (if available).
ParserError & mu::ParserError::operator= | ( | const ParserError & | a_Obj | ) |
Assignment operator.
void mu::ParserError::SetFormula | ( | const string_type & | a_strFormula | ) |
Set the expression related to this error.