</pre><p>Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><spanclass="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div><h3><aname="virCopyLastError"id="virCopyLastError"></a>Function: virCopyLastError</h3><preclass="programlisting">int virCopyLastError (<ahref="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br/>
</pre><p>Copy the content of the last error caught at the library level One will need to free the result with virResetError()</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div><h3><aname="virErrorFunc"id="virErrorFunc"></a>Function type: virErrorFunc</h3><preclass="programlisting">Function type: virErrorFunc
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div><h3><aname="virDefaultErrorFunc"id="virDefaultErrorFunc"></a>Function: virDefaultErrorFunc</h3><preclass="programlisting">void virDefaultErrorFunc (<ahref="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br/>
</pre><p>Default routine reporting an error to stderr.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>err</tt></i>:</span></td><td>pointer to the error.</td></tr></tbody></table></div><h3><aname="virErrorFunc"id="virErrorFunc"></a>Function type: virErrorFunc</h3><preclass="programlisting">Function type: virErrorFunc
</pre><p>Signature of a function to use when there is an error raised by the library.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the error callback</td></tr><tr><td><spanclass="term"><i><tt>error</tt></i>:</span></td><td>the error being raised.</td></tr></tbody></table></div><br/>
<info>a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.</info>
<info>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires priviledged access to the hypervisor.</info>
<returntype='virDomainPtr'info='a new domain object or NULL in case of failure'/>