Browse
 
Tools
Rss Categories

LV_SRE_ReturnGrammarNumWarnings

Reference Number: AA-02069 Views: 1056 0 Rating/ Voters

Returns the number of warnings encountered during a load of the specified grammar (if any)

Function

  • int LV_SRE_ReturnGrammarNumWarnings(HPORT hport, const char* GrammarLabel)

Parameters

hport

The port's handle. 

GrammarLabel

The label of the grammar whose number of warnings needs to be returned.

Return Values

Non-negative number

The actual number of warnings associated with the specified grammar.

LV_INVALID_HPORT

The input hport is not a valid one.

LV_FAILURE

The operation failed because the port was shutting down.

LV_EXCEPTION

An exception occurred while processing the request.


Remarks

Values returned by LV_SRE_ReturnGrammarNumWarnings are particularly useful when debugging grammar load warnings. 

Typically, when loading a grammar, some not-fatal warnings may not be severe enough to cause a grammar load to fail, so these warnings may often be overlooked. This function, and the corresponding functions listed below can uncover previously unknown issues within grammars.