axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
typedef struct _axlError axlError

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:

1 // declare the axlError reference
2 axlError * error;
4 // parse the document, giving a reference to the axlError
5 // NOTE: you can safely provide a NULL reference.
6 doc = axl_doc_parse_from_file ("test.xml", &error);
7 if (doc == NULL) {
8  printf ("Parse error: code=%d, message=%s\n",
9  axl_error_get_code (error), axl_error_get (error));
10  axl_error_free (error);
11  return axl_false;
12 }
14 // beyond this point, it is not required to do
15 // any especial task with the axlError reference

To get more information about the axlError check its API documentation.