<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Xapian: API Documentation: xapian-core: Xapian::Error 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.2 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</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="nav"> <a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1Error.html">Error</a></div> <h1>Xapian::Error Class Reference</h1><!-- doxytag: class="Xapian::Error" -->All exceptions thrown by <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> are subclasses of <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a>. <a href="#_details">More...</a> <p> Inheritance diagram for Xapian::Error:<p><center><img src="classXapian_1_1Error__inherit__graph.png" border="0" usemap="#Xapian_1_1Error__inherit__map" alt="Inheritance graph"></center> <map name="Xapian_1_1Error__inherit__map"> <area shape="rect" href="classXapian_1_1LogicError.html" title="The base class for exceptions indicating errors in the program logic." alt="" coords="459,84,595,111"><area shape="rect" href="classXapian_1_1RuntimeError.html" title="The base class for exceptions indicating errors only detectable at runtime." alt="" coords="1425,84,1580,111"><area shape="rect" href="classXapian_1_1AssertionError.html" title="AssertionError is thrown if a logical assertion inside Xapian fails." alt="" coords="5,161,168,188"><area shape="rect" href="classXapian_1_1InvalidArgumentError.html" title="InvalidArgumentError indicates an invalid parameter value was passed to the API." alt="" coords="192,161,400,188"><area shape="rect" href="classXapian_1_1InvalidOperationError.html" title="InvalidOperationError indicates the API was used in an invalid way." alt="" coords="424,161,629,188"><area shape="rect" href="classXapian_1_1UnimplementedError.html" title="UnimplementedError indicates an attempt to use an unimplemented feature." alt="" coords="653,161,859,188"><area shape="rect" href="classXapian_1_1DatabaseError.html" title="DatabaseError indicates some sort of database related error." alt="" coords="883,161,1048,188"><area shape="rect" href="classXapian_1_1DocNotFoundError.html" title="Indicates an attempt to access a document not present in the database." alt="" coords="1072,161,1261,188"><area shape="rect" href="classXapian_1_1FeatureUnavailableError.html" title="Indicates an attempt to use a feature which is unavailable." alt="" coords="1285,161,1509,188"><area shape="rect" href="classXapian_1_1InternalError.html" title="InternalError indicates a runtime problem of some sort." alt="" coords="1533,161,1685,188"><area shape="rect" href="classXapian_1_1NetworkError.html" title="Indicates a problem communicating with a remote database." alt="" coords="1709,161,1864,188"><area shape="rect" href="classXapian_1_1QueryParserError.html" title="Indicates a query string can't be parsed." alt="" coords="1888,161,2069,188"><area shape="rect" href="classXapian_1_1RangeError.html" title="RangeError indicates an attempt to access outside the bounds of a container." alt="" coords="2093,161,2237,188"><area shape="rect" href="classXapian_1_1DatabaseCorruptError.html" title="DatabaseCorruptError indicates database corruption was detected." alt="" coords="399,239,612,265"><area shape="rect" href="classXapian_1_1DatabaseCreateError.html" title="DatabaseCreateError indicates a failure to create a database." alt="" coords="636,239,844,265"><area shape="rect" href="classXapian_1_1DatabaseLockError.html" title="DatabaseLockError indicates failure to lock a database." alt="" coords="868,239,1063,265"><area shape="rect" href="classXapian_1_1DatabaseModifiedError.html" title="DatabaseModifiedError indicates a database was modified." alt="" coords="1087,239,1305,265"><area shape="rect" href="classXapian_1_1DatabaseOpeningError.html" title="DatabaseOpeningError indicates failure to open a database." alt="" coords="1329,239,1548,265"><area shape="rect" href="classXapian_1_1DatabaseVersionError.html" title="DatabaseVersionError indicates that a database is in an unsupported format." alt="" coords="1333,316,1544,343"><area shape="rect" href="classXapian_1_1NetworkTimeoutError.html" title="Indicates a timeout expired while communicating with a remote database." alt="" coords="1683,239,1891,265"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classXapian_1_1Error-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">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#d6d82323a51060b005c366c21b95868b">get_type</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The type of this error (e.g. "DocNotFoundError".). <a href="#d6d82323a51060b005c366c21b95868b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#f9ef59d8237091d5ce8abd03fd124743">get_msg</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Message giving details of the error, intended for human consumption. <a href="#f9ef59d8237091d5ce8abd03fd124743"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#37df52c09adb7b23bad9f5cd987a153e">get_context</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Optional context information. <a href="#37df52c09adb7b23bad9f5cd987a153e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#f3988827d809367a35b287290aefc0b9">get_error_string</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns any system error string associated with this exception. <a href="#f3988827d809367a35b287290aefc0b9"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#9f1254bdcebad2a2530b97b74c3d1144">get_errno</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Optional value of 'errno' associated with this error. <a href="#9f1254bdcebad2a2530b97b74c3d1144"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#15e55fde54a1c463543fd873b6eef230">get_description</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return a string describing this object. <a href="#15e55fde54a1c463543fd873b6eef230"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> All exceptions thrown by <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> are subclasses of <a class="el" href="classXapian_1_1Error.html" title="All exceptions thrown by Xapian are subclasses of Xapian::Error.">Xapian::Error</a>. <p> This class can not be instantiated directly - instead a subclass should be used. <p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="d6d82323a51060b005c366c21b95868b"></a><!-- doxytag: member="Xapian::Error::get_type" ref="d6d82323a51060b005c366c21b95868b" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* Xapian::Error::get_type </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> The type of this error (e.g. "DocNotFoundError".). <p> </div> </div><p> <a class="anchor" name="f9ef59d8237091d5ce8abd03fd124743"></a><!-- doxytag: member="Xapian::Error::get_msg" ref="f9ef59d8237091d5ce8abd03fd124743" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const std::string& Xapian::Error::get_msg </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Message giving details of the error, intended for human consumption. <p> </div> </div><p> <a class="anchor" name="37df52c09adb7b23bad9f5cd987a153e"></a><!-- doxytag: member="Xapian::Error::get_context" ref="37df52c09adb7b23bad9f5cd987a153e" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const std::string& Xapian::Error::get_context </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Optional context information. <p> This context is intended for use by <a class="el" href="classXapian_1_1ErrorHandler.html" title="Decide if a Xapian::Error exception should be ignored.">Xapian::ErrorHandler</a> (for example so it can know which remote server is unreliable and report the problem and remove that server from those being searched). But it's typically a plain-text string, and so also fit for human consumption. </div> </div><p> <a class="anchor" name="f3988827d809367a35b287290aefc0b9"></a><!-- doxytag: member="Xapian::Error::get_error_string" ref="f3988827d809367a35b287290aefc0b9" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* Xapian::Error::get_error_string </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Returns any system error string associated with this exception. <p> The system error string may come from errno, h_errno (on UNIX), or GetLastError() (on MS Windows). If there is no associated system error string, NULL is returned. </div> </div><p> <a class="anchor" name="9f1254bdcebad2a2530b97b74c3d1144"></a><!-- doxytag: member="Xapian::Error::get_errno" ref="9f1254bdcebad2a2530b97b74c3d1144" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Xapian::Error::get_errno </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Optional value of 'errno' associated with this error. <p> If no 'errno' value is associated, returns 0. If the returned value is negative, it's a platform-specific error code (on UNIX, -h_errno; on MS Windows, -GetLastError()).<p> <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>This method is deprecated, because errno values aren't portable between platforms, so we can't serialise them when passing exceptions from a remote server to a client. Use the <a class="el" href="classXapian_1_1Error.html#f3988827d809367a35b287290aefc0b9" title="Returns any system error string associated with this exception.">get_error_string()</a> method instead. </dd></dl> </div> </div><p> <a class="anchor" name="15e55fde54a1c463543fd873b6eef230"></a><!-- doxytag: member="Xapian::Error::get_description" ref="15e55fde54a1c463543fd873b6eef230" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Xapian::Error::get_description </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Return a string describing this object. <p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>xapian/<a class="el" href="error_8h.html">error.h</a></ul> <hr> <address><small> Documentation for Xapian (version 1.0.21).<br> Generated on 18 Jun 2010 by <a href="http://www.doxygen.org/">Doxygen 1.5.2</a>. </small></address> </body> </html>