> The XQuery Processor
#include <zorba/zorbac.h>
Data Fields | |
| void(* | error )(XQC_ErrorHandler handler, XQUERY_ERROR error, const char *local_name, const char *description, const char *query_uri, unsigned int line, unsigned int column) |
| The function is called when an error occurs. | |
| void * | user_data |
| Can be used for user specific purposes. | |
An XQC_ErrorHandler can be set for a query using the XQC_Query::set_error_handler() function.
The XQC_ErrorHandler struct has no free() function pointer because the user remains responsible for freeing the resources associated with this struct.
Definition at line 2048 of file zorbac.h.
| void(* XQC_ErrorHandler_s::error)(XQC_ErrorHandler handler, XQUERY_ERROR error, const char *local_name, const char *description, const char *query_uri, unsigned int line, unsigned int column) |
The function is called when an error occurs.
The function receives the components of the error as arguments. When this function returns, the implementation will exit query parsing or execution with the error enumeration value passed as an argument.
| handler | The XQC_ErrorHandler that this function pointer is a member of | |
| error | The error as a value of the XQUERY_ERROR enum. | |
| local_name | The local name of the error or an empty string if no local_name is given (e.g. for errors not defined in the spec). | |
| description | A detailed description of the error or an empty string if no description is available. | |
| query_uri | The uri of the query causing the error or an empty string if no uri is available for the query. | |
| line | The line number of the query where the error occured. | |
| components | The column number in the line in the query where the error occured. |