//--------------------------------------------------------------------------- API_EXPORT(void) mupSetErrorHandler(muParserHandle_t a_hParser, muErrorHandler_t a_pHandler) { AsParserTag(a_hParser)->errHandler = a_pHandler; }
/** \brief Query if an error occured. After querying the internal error bit will be reset. So a consecutive call will return false. */ API_EXPORT(muBool_t) mupError(muParserHandle_t a_hParser) { bool bError( AsParserTag(a_hParser)->bError ); AsParserTag(a_hParser)->bError = false; return bError; }
/** \brief Reset the internal error flag. */ API_EXPORT(void) mupErrorReset(muParserHandle_t a_hParser) { AsParserTag(a_hParser)->bError = false; }
/** \brief Return the postion associated with the last error. */ API_EXPORT(int) mupGetErrorPos(muParserHandle_t a_hParser) { return (int)AsParserTag(a_hParser)->exc.GetPos(); }
/** \brief Return the code associated with the last error. */ API_EXPORT(int) mupGetErrorCode(muParserHandle_t a_hParser) { return AsParserTag(a_hParser)->exc.GetCode(); }
//----------------------------------------------------------------------------------------------------- API_EXPORT(const muChar_t*) mupGetErrorExpr(muParserHandle_t a_hParser) { return AsParserTag(a_hParser)->exc.GetExpr().c_str(); }
/** \brief Return the message associated with the last error. */ API_EXPORT(const char*) mupGetErrorToken(muParserHandle_t a_hParser) { return AsParserTag(a_hParser)->exc.GetToken().c_str(); }
//--------------------------------------------------------------------------- API_EXPORT(void) mecSetErrorHandler(mecParserHandle_t a_hParser, mecErrorHandler_t a_pHandler) { AsParserTag(a_hParser)->errHandler = a_pHandler; }