22#include "../ParserLib/muParserDef.h"
323 SyntaxError(
ErrorCode _err,
const std::string& sExpr,
size_t n_pos,
const std::string& sToken,
int nInd1,
int nInd2 =
invalid_index,
int nInd3 =
invalid_index,
int nInd4 =
invalid_index) :
sFailingExpression(sExpr),
sErrorToken(sToken),
nErrorPosition(n_pos),
errorcode(_err)
559 void enable(
const std::string& sExpr);
This class handles assertions and throws the corresponding exception, if the assertion fails....
void enable(const std::string &sExpr)
Enables the assertion handler using the passed expression.
void reset()
Resets the assertion handler.
AssertionStats getStats() const
Returns the current tests stats.
void assertionFail()
This member function is a wrapper around the assertion error.
void resetStats()
Resets the internal statistic variables for accumulating the total number of executed and the number ...
std::string sAssertedExpression
void checkAssertion(mu::value_type *v, int nNum)
Checks the return value of a muParser evaluated result.
This class handles the internal language system and returns the language strings of the selected lang...
This class defines a dynamic size 2D matrix with a single 1D internal buffer. If the internal buffer ...
Common exception class for all exceptions thrown in NumeRe.
SyntaxError(ErrorCode _err, const std::string &sExpr, size_t n_pos, const std::string &sToken)
Creates an exception based from an expression and position and provides the possibility to define an ...
SyntaxError()
Default constructor to create an invalid exception.
SyntaxError(ErrorCode _err, const std::string &sExpr, const std::string &sErrTok)
Creates an exception based from an expression and an error token, which is used to locate the positio...
SyntaxError(ErrorCode _err, const std::string &sExpr, size_t n_pos, int nInd1, int nInd2=invalid_index, int nInd3=invalid_index, int nInd4=invalid_index)
Creates an exception based from an expression and position and provides the possibility to set additi...
std::string getToken() const
Returns the error token containing additional information about the error.
std::string sFailingExpression
@ DATAPOINTS_CANNOT_BE_MODIFIED_WHILE_PLOTTING
@ MATRIX_IS_NOT_INVERTIBLE
@ EXECUTE_COMMAND_UNSUCCESSFUL
@ FUNCTION_ALREADY_EXISTS
@ PLUGIN_MAY_NOT_OVERRIDE
@ INVALID_INTEGRATION_RANGES
@ TOO_MANY_FUNCTION_CALLS
@ TABLE_DOESNT_EXIST
INSERT HERE.
@ ELLIPSIS_MUST_BE_LAST_ARG
@ CANNOT_BE_A_FITTING_PARAM
INSERT HERE.
@ TOO_MANY_ARGS_FOR_DEFINE
@ CANNOT_ASSIGN_COLUMN_OF_DIFFERENT_TYPE
@ STRINGVARS_MUSTNT_CONTAIN
@ STRINGVARS_MUSTNT_BEGIN_WITH_A_NUMBER
@ INVALID_WAVELET_COEFFICIENT
@ FUNCTION_NAMES_MUST_NOT_CONTAIN_SIGN
@ INTERNAL_RESAMPLER_ERROR
@ INLINE_PROCEDURE_IS_NOT_INLINE
@ PROCEDURE_STACK_OVERFLOW
@ IF_OR_LOOP_SEEMS_NOT_TO_BE_CLOSED
@ INVALID_STATS_WINDOW_SIZE
@ EXTERNAL_PROGRAM_NOT_FOUND
@ PLUGINNAME_ALREADY_EXISTS
@ FUNCTION_STRING_IS_COMMAND
@ FUNCTION_CANNOT_BE_FITTED
@ CANNOT_FIND_DEFINE_OPRT
@ PROCEDURE_WITHOUT_INSTALL_FOUND
@ NO_INTEGRATION_FUNCTION
@ LGS_HAS_NO_UNIQUE_SOLUTION
@ PLUGINCMD_ALREADY_EXISTS
@ NUMBER_OF_FUNCTIONS_NOT_MATCHING
INSERT HERE.
@ MATRIX_CONTAINS_INVALID_VALUES
@ MATRIX_CANNOT_HAVE_ZERO_SIZE
@ FUNCTION_ARGS_MUST_NOT_CONTAIN_SIGN
@ PRIVATE_PROCEDURE_CALLED
INSERT HERE.
@ NO_DEFAULTVALUE_FOR_DIALOG
@ EXECUTE_COMMAND_DISABLED
@ CANNOT_REGULARIZE_CACHE
@ WRONG_MATRIX_DIMENSIONS_FOR_MATOP
@ INVALID_INTEGRATION_PRECISION
@ CANNOT_GENERATE_PROCEDURE
@ INCOMPLETE_VECTOR_SYNTAX
@ HLPIDX_ENTRY_IS_MISSING
INSERT HERE.
@ LGS_HAS_NO_SOLUTION
INSERT HERE.
@ ZEROES_VAR_NOT_FOUND
INSERT HERE.
@ COL_COUNTS_DOESNT_MATCH
INSERT HERE.
@ CACHE_CANNOT_BE_RENAMED
@ INLINE_PROCEDURE_NEEDS_TABLE_REFERENCES
@ STRINGS_MAY_NOT_BE_EVALUATED_WITH_CMD
@ DATAFILE_NOT_EXIST
INSERT HERE.
@ INVALID_FLOWCTRL_STATEMENT
@ INSUFFICIENT_NUMERE_VERSION
@ MATRIX_IS_NOT_SYMMETRIC
@ WRONG_PLOT_INTERVAL_FOR_LOGSCALE
@ CANNOT_CALL_SCRIPT_RECURSIVELY
@ FILETYPE_MAY_NOT_BE_WRITTEN
@ CANNOT_PASS_LITERAL_PER_REFERENCE
@ CANNOT_FIND_FUNCTION_ARGS
@ CANNOT_GENERATE_DIRECTORY
@ PROCESS_ABORTED_BY_USER
@ UNKNOWN_PATH_TOKEN
INSERT HERE.
size_t getPosition() const
Returns the position of the error in the erroneous expression.
SyntaxError(ErrorCode _err, const std::string &sExpr, size_t n_pos, const std::string &sToken, int nInd1, int nInd2=invalid_index, int nInd3=invalid_index, int nInd4=invalid_index)
Creates an exception based from an expression and position and provides the possibility to set an add...
const int * getIndices() const
Returns a pointer to the internal array of 4 error indices.
SyntaxError(ErrorCode _err, const std::string &sExpr, const std::string &sErrTok, int nInd1, int nInd2=invalid_index, int nInd3=invalid_index, int nInd4=invalid_index)
Creates an exception based from an expression and an error token, which is used to locate the positio...
static size_t invalid_position
std::string getExpr() const
Returns the erroneous expression.
SyntaxError(ErrorCode _err, const std::string &sExpr, const std::string &sErrTok, const std::string &sToken, int nInd1, int nInd2=invalid_index, int nInd3=invalid_index, int nInd4=invalid_index)
Creates an exception based from an expression and an error token, which is used to locate the positio...
SyntaxError(ErrorCode _err, const std::string &sExpr, const std::string &sErrTok, const std::string &sToken)
Creates an exception based from an expression and an error token, which is used to locate the positio...
SyntaxError(ErrorCode _err, const std::string &sExpr, size_t n_pos)
Creates an exception based from an expression and position.
ErrorType getErrorType(std::exception_ptr e_ptr)
This function obtains the error type of a catched exception and sets the last error message.
std::string errorTypeToString(ErrorType e)
Return the error type converted to a human readable string.
ErrorType
Defines the possible error types, which can be thrown in this application.
Assertion _assertionHandler
std::string getLastErrorMessage()
Return the last error message, which was catched by the getErrorType() function.
ErrorType getLastErrorType()
Return the last error type, which was catched by the getErrorType() function.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
This structure accumulates the statistics for the assertion handler.
void failed()
Assertion failed.
void succeeded()
Assertion was successful.
void reset()
Reset the statistics.
size_t nCheckedAssertions
This structure contains all possible return values of the central string parser in single combined st...