SourceForge.net Logo
Public Attributes | List of all members
XQC_ErrorHandler_s Struct Reference

The XQC_ErrorHandler struct is designed to be populated by users for the purpose of collecting more detailed error messages from an XQC implementation. More...

#include <xqc.h>

Public Attributes

void * user_data
 Can be used for user specific purposes. More...
 
void(* error )(XQC_ErrorHandler *handler, XQC_Error error, const char *error_uri, const char *error_localname, const char *description, XQC_Sequence *error_object)
 The function called when an error occurs. More...
 

Detailed Description

The XQC_ErrorHandler struct is designed to be populated by users for the purpose of collecting more detailed error messages from an XQC implementation.

An XQC_ErrorHandler can be set for a query execution using the XQC_StaticContext::set_error_handler() and XQC_DynamicContext::set_error_handler() functions.

The XQC_ErrorHandler struct has no free() function pointer because the user remains responsible for freeing the resources associated with this struct.

Member Data Documentation

void(* XQC_ErrorHandler_s::error)(XQC_ErrorHandler *handler, XQC_Error error, const char *error_uri, const char *error_localname, const char *description, XQC_Sequence *error_object)

The function called when an error occurs.

The function receives the components of the error as arguments. When this function returns, the implementation will exit query preparation or execution with the error enumeration value passed as an argument.

Parameters
handlerThe XQC_ErrorHandler that this function pointer is a member of
errorAn enumeration value representing the type of error. One of either XQC_STATIC_ERROR, XQC_TYPE_ERROR, XQC_DYNAMIC_ERROR, or XQC_SERIALIZATION_ERROR.
error_uriThe namespace URI of the error code QName as a UTF-8 string, or 0 if there is no namespace URI.
error_localnameThe local name of the error code QName as a UTF-8 string.
descriptionThe description of the error message as a UTF-8 string. The description may be absent, in which case this parameter will be 0.
error_objectThe error object, potentially passed to the fn:error() function. The user owns this object, and is responsible for freeing it. The error_object may be absent, in which case this parameter will be 0. Some implementations may not provide this functionality, meaning that this parameter will always be 0.
void* XQC_ErrorHandler_s::user_data

Can be used for user specific purposes.


The documentation for this struct was generated from the following file: