<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Xapian: API Documentation: xapian-core: Xapian::ErrorHandler Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.5.9 --> <script type="text/javascript"> <!-- function changeDisplayState (e){ var num=this.id.replace(/[^[0-9]/g,''); var button=this.firstChild; var sectionDiv=document.getElementById('dynsection'+num); if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ sectionDiv.style.display='block'; button.src='open.gif'; }else{ sectionDiv.style.display='none'; button.src='closed.gif'; } } function initDynSections(){ var divs=document.getElementsByTagName('div'); var sectionCounter=1; for(var i=0;i<divs.length-1;i++){ if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ var header=divs[i]; var section=divs[i+1]; var button=header.firstChild; if (button!='IMG'){ divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); button=document.createElement('img'); divs[i].insertBefore(button,divs[i].firstChild); } header.style.cursor='pointer'; header.onclick=changeDisplayState; header.id='dynheader'+sectionCounter; button.src='closed.gif'; section.id='dynsection'+sectionCounter; section.style.display='none'; section.style.marginLeft='14px'; sectionCounter++; } } } window.onload = initDynSections; --> </script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</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> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1ErrorHandler.html">ErrorHandler</a> </div> </div> <div class="contents"> <h1>Xapian::ErrorHandler Class Reference</h1><!-- doxytag: class="Xapian::ErrorHandler" -->Decide if a <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a> exception should be ignored. <a href="#_details">More...</a> <p> <p> <a href="classXapian_1_1ErrorHandler-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2833c2fd77c9979574c63cee8db96e05"></a><!-- doxytag: member="Xapian::ErrorHandler::ErrorHandler" ref="2833c2fd77c9979574c63cee8db96e05" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ErrorHandler.html#2833c2fd77c9979574c63cee8db96e05">ErrorHandler</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f4fccfeed11d85364088e5bed7f9048b"></a><!-- doxytag: member="Xapian::ErrorHandler::~ErrorHandler" ref="f4fccfeed11d85364088e5bed7f9048b" args="()" --> virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ErrorHandler.html#f4fccfeed11d85364088e5bed7f9048b">~ErrorHandler</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">We require a virtual destructor because we have virtual methods. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ErrorHandler.html#a3085bcf9a4e25bd2dd5d99710763b51">operator()</a> (<a class="el" href="classXapian_1_1Error.html">Xapian::Error</a> &error)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Handle a <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a> object. <a href="#a3085bcf9a4e25bd2dd5d99710763b51"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Decide if a <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a> exception should be ignored. <p> You can create your own subclass of this class and pass in an instance of it when you construct a <a class="el" href="classXapian_1_1Enquire.html" title="This class provides an interface to the information retrieval system for the purpose...">Xapian::Enquire</a> object. <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a> exceptions which happen during the match process are passed to this object and it can decide whether they should propagate or whether <a class="el" href="classXapian_1_1Enquire.html" title="This class provides an interface to the information retrieval system for the purpose...">Enquire</a> should attempt to continue.<p> The motivation is to allow searching over remote databases to handle a remote server which has died (both to allow results to be returned, and also so that such errors can be logged and dead servers temporarily removed from use). <hr><h2>Member Function Documentation</h2> <a class="anchor" name="a3085bcf9a4e25bd2dd5d99710763b51"></a><!-- doxytag: member="Xapian::ErrorHandler::operator()" ref="a3085bcf9a4e25bd2dd5d99710763b51" args="(Xapian::Error &error)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Xapian::ErrorHandler::operator() </td> <td>(</td> <td class="paramtype"><a class="el" href="classXapian_1_1Error.html">Xapian::Error</a> & </td> <td class="paramname"> <em>error</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Handle a <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a> object. <p> This method is called when a <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a> object is thrown and caught inside <a class="el" href="classXapian_1_1Enquire.html" title="This class provides an interface to the information retrieval system for the purpose...">Enquire</a>. If this is the first <a class="el" href="classXapian_1_1ErrorHandler.html" title="Decide if a Xapian::Error exception should be ignored.">ErrorHandler</a> that the <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Error</a> has been passed to, then the handle_error() virtual method is called, which allows the API user to decide how to handle the error.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>error</em> </td><td>The <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a> object under consideration. </td></tr> </table> </dl> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>xapian/<a class="el" href="errorhandler_8h.html">errorhandler.h</a></ul> </div> <hr> <address><small> Documentation for Xapian (version 1.2.12).<br> Generated on 27 Jun 2012 by <a href="http://www.doxygen.org/">Doxygen 1.5.9</a>. </small></address> </body> </html>