Returns the length of the first warning string associated with the specified grammar (if any). This can be used to determine the size of a string buffer needed to hold the warning string prior to calling LV_SRE_ReturnGrammarFirstWarningString
- int LV_SRE_ReturnGrammarFirstWarningStringLength(HPORT hport, const char* GrammarLabel)
The port's handle.
The label of the grammar whose first warning string needs to be returned.
The actual length of the first warning string for the specified grammar (if any). This value can be used to determine the buffer size needed to hold the string prior to calling LV_SRE_ReturnGrammarFirstWarningString.
The input hport is not a valid one.
The operation failed because the port was shutting down.
An exception occurred while processing the request.
Values returned by LV_SRE_ReturnGrammarFirstWarningStringLength 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.