Next: , Previous: , Up: Error methods macros and codes   [Contents]


19.1 Error methods

Function: Marpa_Error_Code marpa_g_error ( Marpa_Grammar g, const char** p_error_string)

When a method fails, this method allows the application to read the error code. p_error_string is reserved for use by the internals. Applications should set it to NULL.

Return value: The last error code from a Libmarpa method. Always succeeds.

Function: Marpa_Error_Code marpa_g_error_clear ( Marpa_Grammar g )

Sets the error code to MARPA_ERR_NONE. Not often used, but now and then it can be useful to force the error code to a known state.

Return value: MARPA_ERR_NONE. Always succeeds.