XQuilla/docs/xqc-api/structXQC__ErrorHandler__s.html
2020-02-17 22:23:50 +01:00

96 lines
7.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>XQilla XQC API Documentation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<a style="float:right;" href="http://sourceforge.net/projects/xqilla"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=152021&amp;type=2" border="0" alt="SourceForge.net Logo" /></a>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>XQC_ErrorHandler_s Struct Reference</h1><!-- doxytag: class="XQC_ErrorHandler_s" -->
<p>The <a class="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.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="xqc_8h_source.html">xqc.h</a>&gt;</code></p>
<p><a href="structXQC__ErrorHandler__s-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXQC__ErrorHandler__s.html#a576532f27add49c11ee2d34f045458cf">user_data</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Can be used for user specific purposes. <a href="#a576532f27add49c11ee2d34f045458cf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXQC__ErrorHandler__s.html#afc5eb3e21afa1c8d88fa56ae55de5ce0">error</a> )(<a class="el" href="structXQC__ErrorHandler__s.html">XQC_ErrorHandler</a> *handler, <a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3f">XQC_Error</a> <a class="el" href="structXQC__ErrorHandler__s.html#afc5eb3e21afa1c8d88fa56ae55de5ce0">error</a>, const char *error_uri, const char *error_localname, const char *description, <a class="el" href="structXQC__Sequence__s.html">XQC_Sequence</a> *error_object)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The function called when an error occurs. <a href="#afc5eb3e21afa1c8d88fa56ae55de5ce0"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The <a class="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 <a class="el" href="structXQC__StaticContext__s.html#a327c278c2968546780e361bf5397f30e">XQC_StaticContext::set_error_handler()</a> and <a class="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>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="afc5eb3e21afa1c8d88fa56ae55de5ce0"></a><!-- doxytag: member="XQC_ErrorHandler_s::error" ref="afc5eb3e21afa1c8d88fa56ae55de5ce0" args=")(XQC_ErrorHandler *handler, XQC_Error error, const char *error_uri, const char *error_localname, const char *description, XQC_Sequence *error_object)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* <a class="el" href="structXQC__ErrorHandler__s.html#afc5eb3e21afa1c8d88fa56ae55de5ce0">XQC_ErrorHandler_s::error</a>)(<a class="el" href="structXQC__ErrorHandler__s.html">XQC_ErrorHandler</a> *handler, <a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3f">XQC_Error</a> <a class="el" href="structXQC__ErrorHandler__s.html#afc5eb3e21afa1c8d88fa56ae55de5ce0">error</a>, const char *error_uri, const char *error_localname, const char *description, <a class="el" href="structXQC__Sequence__s.html">XQC_Sequence</a> *error_object)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The function called when an error occurs. </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>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>handler</em>&nbsp;</td><td>The XQC_ErrorHandler that this function pointer is a member of </td></tr>
<tr><td valign="top"></td><td valign="top"><em>error</em>&nbsp;</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><td valign="top"></td><td valign="top"><em>error_uri</em>&nbsp;</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><td valign="top"></td><td valign="top"><em>error_localname</em>&nbsp;</td><td>The local name of the error code QName as a UTF-8 string. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>description</em>&nbsp;</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><td valign="top"></td><td valign="top"><em>error_object</em>&nbsp;</td><td>The error object, potentially passed to the <code>fn:<a class="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>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a576532f27add49c11ee2d34f045458cf"></a><!-- doxytag: member="XQC_ErrorHandler_s::user_data" ref="a576532f27add49c11ee2d34f045458cf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="structXQC__ErrorHandler__s.html#a576532f27add49c11ee2d34f045458cf">XQC_ErrorHandler_s::user_data</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Can be used for user specific purposes. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="xqc_8h_source.html">xqc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 8 Jul 2015 for XQilla XQC API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>