Error class of the parser. More...
#include <qmuparsererror.h>
Public Member Functions | |
| QmuParserError () | |
| Default constructor. More... | |
| QmuParserError (EErrorCodes a_iErrc) | |
| This Constructor is used for internal exceptions only. More... | |
| QmuParserError (const QString &sMsg) | |
| Construct an error from a message text. More... | |
| QmuParserError (EErrorCodes a_iErrc, const QString &sTok, const QString &sFormula=QString(), int a_iPos=-1) | |
| Construct an error object. More... | |
| QmuParserError (EErrorCodes a_iErrc, int a_iPos, const QString &sTok) | |
| Construct an error object. More... | |
| QmuParserError (const QString &szMsg, int iPos, const QString &sTok=QString()) | |
| Construct an error object. More... | |
| QmuParserError (const QmuParserError &a_Obj) | |
| Copy constructor. More... | |
| QmuParserError & | operator= (const QmuParserError &a_Obj) |
| Assignment operator. More... | |
| virtual | ~QmuParserError () Q_DECL_OVERRIDE |
| void | SetFormula (const QString &a_strFormula) |
| Set the expression related to this error. More... | |
| const QString & | GetExpr () const |
| gets the expression related tp this error. More... | |
| const QString & | GetMsg () const |
| Returns the message string for this error. More... | |
| int | GetPos () const |
| Return the formula position related to the error. More... | |
| const QString & | GetToken () const |
| Return string related with this token (if available). More... | |
| EErrorCodes | GetCode () const |
| Return the error code. More... | |
| virtual Q_NORETURN void | raise () const Q_DECL_OVERRIDE |
| raise method raise for exception More... | |
| virtual Q_REQUIRED_RESULT QmuParserError * | clone () const Q_DECL_OVERRIDE |
| clone clone exception More... | |
Private Member Functions | |
| void | Reset () |
| Reset the erro object. More... | |
Private Attributes | |
| QString | m_sMsg |
| The message string. More... | |
| QString | m_sExpr |
| Formula string. More... | |
| QString | m_sTok |
| Token related with the error. More... | |
| int | m_iPos |
| Formula position related to the error. More... | |
| EErrorCodes | m_iErrc |
| Error code. More... | |
| const QmuParserErrorMsg & | m_ErrMsg |
Error class of the parser.
Part of the math parser package.
Definition at line 136 of file qmuparsererror.h.
| qmu::QmuParserError::QmuParserError | ( | ) |
|
explicit |
|
explicit |
Construct an error from a message text.
Definition at line 193 of file qmuparsererror.cpp.
| qmu::QmuParserError::QmuParserError | ( | EErrorCodes | iErrc, |
| const QString & | sTok, | ||
| const QString & | sExpr = QString(), |
||
| int | iPos = -1 |
||
| ) |
Construct an error object.
| [in] | iErrc | the error code. |
| [in] | sTok | The token string related to this error. |
| [in] | sExpr | The expression related to the error. |
| [in] | iPos | the position in the expression where the error occured. |
Definition at line 206 of file qmuparsererror.cpp.
| qmu::QmuParserError::QmuParserError | ( | EErrorCodes | a_iErrc, |
| int | a_iPos, | ||
| const QString & | sTok | ||
| ) |
| qmu::QmuParserError::QmuParserError | ( | const QString & | szMsg, |
| int | iPos, | ||
| const QString & | sTok = QString() |
||
| ) |
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. |
Definition at line 237 of file qmuparsererror.cpp.
| qmu::QmuParserError::QmuParserError | ( | const QmuParserError & | a_Obj | ) |
Copy constructor.
Definition at line 249 of file qmuparsererror.cpp.
|
inlinevirtual |
Definition at line 147 of file qmuparsererror.h.
|
virtual |
clone clone exception
Definition at line 299 of file qmuparsererror.cpp.
References QmuParserError().
|
inline |
Return the error code.
Definition at line 218 of file qmuparsererror.h.
Referenced by qmu::QmuParserTokenReader::IsEOF(), and qmu::Test::QmuParserTester::ThrowTest().
|
inline |
gets the expression related tp this error.
Definition at line 180 of file qmuparsererror.h.
Referenced by VAbstractTool::CheckFormula(), qmu::Test::QmuParserTester::EqnTestBulk(), VFormula::Eval(), DialogTool::Eval(), Visualization::FindVal(), and VTranslateVars::FormulaToUser().
|
inline |
Returns the message string for this error.
Definition at line 189 of file qmuparsererror.h.
Referenced by VAbstractTool::CheckFormula(), qmu::Test::QmuParserTester::EqnTest(), qmu::Test::QmuParserTester::EqnTestBulk(), qmu::Test::QmuParserTester::EqnTestWithVarChange(), VFormula::Eval(), DialogTool::Eval(), TMainWindow::EvalFormula(), DialogVariables::evalVariableFormula(), Visualization::FindVal(), VTranslateVars::FormulaToUser(), qmu::QmuParserTokenReader::IsEOF(), qmu::Test::QmuParserTester::Run(), qmu::Test::QmuParserTester::ThrowTest(), PatternPieceDialog::updateGrainlineValues(), PatternPieceDialog::updatePatternLabelValues(), and PatternPieceDialog::updatePieceLabelValues().
|
inline |
Return the formula position related to the error.
If the error is not related to a distinct position this will return -1
Definition at line 200 of file qmuparsererror.h.
|
inline |
Return string related with this token (if available).
Definition at line 209 of file qmuparsererror.h.
Referenced by qmu::Test::QmuParserTester::Run().
| QmuParserError & qmu::QmuParserError::operator= | ( | const QmuParserError & | a_Obj | ) |
|
virtual |
raise method raise for exception
Definition at line 289 of file qmuparsererror.cpp.
|
private |
Reset the erro object.
Definition at line 276 of file qmuparsererror.cpp.
References qmu::ecUNDEFINED, m_iErrc, m_iPos, m_sExpr, m_sMsg, and m_sTok.
|
inline |
Set the expression related to this error.
Definition at line 171 of file qmuparsererror.h.
Referenced by qmu::QmuParserBase::ParseString().
|
private |
Definition at line 163 of file qmuparsererror.h.
Referenced by QmuParserError().
|
private |
Error code.
Definition at line 162 of file qmuparsererror.h.
Referenced by operator=(), QmuParserError(), and Reset().
|
private |
Formula position related to the error.
Definition at line 161 of file qmuparsererror.h.
Referenced by operator=(), QmuParserError(), and Reset().
|
private |
Formula string.
Definition at line 159 of file qmuparsererror.h.
Referenced by operator=(), and Reset().
|
private |
The message string.
Definition at line 158 of file qmuparsererror.h.
Referenced by operator=(), QmuParserError(), and Reset().
|
private |
Token related with the error.
Definition at line 160 of file qmuparsererror.h.
Referenced by operator=(), QmuParserError(), and Reset().