<p>The <aclass="el"href="xqc_8h.html#ac30b575982cfb24206404168dbd0bff0">XQC_ErrorHandler</a> struct is designed to be populated by users for the purpose of collecting more detailed error messages from an XQC implementation.
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Can be used for user specific purposes. <ahref="#a576532f27add49c11ee2d34f045458cf"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function called when an error occurs. <ahref="#afc5eb3e21afa1c8d88fa56ae55de5ce0"></a><br/></td></tr>
<p>The <aclass="el"href="xqc_8h.html#ac30b575982cfb24206404168dbd0bff0">XQC_ErrorHandler</a> struct is designed to be populated by users for the purpose of collecting more detailed error messages from an XQC implementation. </p>
<p>An XQC_ErrorHandler can be set for a query execution using the <aclass="el"href="structXQC__StaticContext__s.html#a327c278c2968546780e361bf5397f30e">XQC_StaticContext::set_error_handler()</a> and <aclass="el"href="structXQC__DynamicContext__s.html#ada19b7ea30122707a79b9e02c871874c">XQC_DynamicContext::set_error_handler()</a> functions.</p>
<p>The XQC_ErrorHandler struct has no free() function pointer because the user remains responsible for freeing the resources associated with this struct.</p>
<p>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.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>handler</em> </td><td>The XQC_ErrorHandler that this function pointer is a member of </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>error</em> </td><td>An enumeration value representing the type of error. One of either XQC_STATIC_ERROR, XQC_TYPE_ERROR, XQC_DYNAMIC_ERROR, or XQC_SERIALIZATION_ERROR. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>error_uri</em> </td><td>The namespace URI of the error code QName as a UTF-8 string, or 0 if there is no namespace URI. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>error_localname</em> </td><td>The local name of the error code QName as a UTF-8 string. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>description</em> </td><td>The description of the error message as a UTF-8 string. The description may be absent, in which case this parameter will be 0. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>error_object</em> </td><td>The error object, potentially passed to the <code>fn:<aclass="el"href="structXQC__ErrorHandler__s.html#afc5eb3e21afa1c8d88fa56ae55de5ce0"title="The function called when an error occurs.">error()</a></code> 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. </td></tr>