Axl error reporting variable. All Axl interface report errors found, with a textual diagnostic, to the application level using this variable. You have to know that it is also optional, so every function that receives an axlError, will properly handle a NULL reference received. Once an error was detected, for that condition you must check the documentation provided for the function that is failing, you can get the error code and the error textual diagnostic by using the following functions:
If an error is not detected, there is no especial operation to be done once returned the function that has received the axlError error reference. However, if an error is detected, the reference must be deallocated by using the following function:
Here is an example: // declare the axlError reference axlError * error; // parse the document, giving a reference to the axlError // NOTE: you can safely provide a NULL reference. doc = axl_doc_parse_from_file ("test.xml", &error); if (doc == NULL) { printf ("Parse error: code=%d, message=%s\n", axl_error_get_code (error), axl_error_get (error)); axl_error_free (error); return false; } // beyond this point, it is not required to do // any especial task with the axlError reference To get more information about the axlError check its API documentation.
|