<!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.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_1Error.html">Error</a> </div> </div> <div class="contents"> <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> <div class="dynheader"> Inheritance diagram for Xapian::Error:</div> <div class="dynsection"> <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="168,107,304,133"><area shape="rect" href="classXapian_1_1RuntimeError.html" title="The base class for exceptions indicating errors only detectable at runtime." alt="" coords="159,360,313,387"><area shape="rect" href="classXapian_1_1AssertionError.html" title="AssertionError is thrown if a logical assertion inside Xapian fails." alt="" coords="395,5,557,32"><area shape="rect" href="classXapian_1_1InvalidArgumentError.html" title="InvalidArgumentError indicates an invalid parameter value was passed to the API." alt="" coords="372,56,580,83"><area shape="rect" href="classXapian_1_1InvalidOperationError.html" title="InvalidOperationError indicates the API was used in an invalid way." alt="" coords="373,107,579,133"><area shape="rect" href="classXapian_1_1UnimplementedError.html" title="UnimplementedError indicates an attempt to use an unimplemented feature." alt="" coords="373,157,579,184"><area shape="rect" href="classXapian_1_1DatabaseError.html" title="DatabaseError indicates some sort of database related error." alt="" coords="393,208,559,235"><area shape="rect" href="classXapian_1_1DocNotFoundError.html" title="Indicates an attempt to access a document not present in the database." alt="" coords="381,259,571,285"><area shape="rect" href="classXapian_1_1FeatureUnavailableError.html" title="Indicates an attempt to use a feature which is unavailable." alt="" coords="364,309,588,336"><area shape="rect" href="classXapian_1_1InternalError.html" title="InternalError indicates a runtime problem of some sort." alt="" coords="400,360,552,387"><area shape="rect" href="classXapian_1_1NetworkError.html" title="Indicates a problem communicating with a remote database." alt="" coords="399,411,553,437"><area shape="rect" href="classXapian_1_1QueryParserError.html" title="Indicates a query string can't be parsed." alt="" coords="385,461,567,488"><area shape="rect" href="classXapian_1_1RangeError.html" title="RangeError indicates an attempt to access outside the bounds of a container." alt="" coords="404,512,548,539"><area shape="rect" href="classXapian_1_1SerialisationError.html" title="Indicates an error in the std::string serialisation of an object." alt="" coords="385,563,567,589"><area shape="rect" href="classXapian_1_1DatabaseCorruptError.html" title="DatabaseCorruptError indicates database corruption was detected." alt="" coords="640,107,853,133"><area shape="rect" href="classXapian_1_1DatabaseCreateError.html" title="DatabaseCreateError indicates a failure to create a database." alt="" coords="643,157,851,184"><area shape="rect" href="classXapian_1_1DatabaseLockError.html" title="DatabaseLockError indicates failure to lock a database." alt="" coords="649,208,844,235"><area shape="rect" href="classXapian_1_1DatabaseModifiedError.html" title="DatabaseModifiedError indicates a database was modified." alt="" coords="637,259,856,285"><area shape="rect" href="classXapian_1_1DatabaseOpeningError.html" title="DatabaseOpeningError indicates failure to open a database." alt="" coords="637,309,856,336"><area shape="rect" href="classXapian_1_1DatabaseVersionError.html" title="DatabaseVersionError indicates that a database is in an unsupported format." alt="" coords="905,309,1116,336"><area shape="rect" href="classXapian_1_1NetworkTimeoutError.html" title="Indicates a timeout expired while communicating with a remote database." alt="" coords="643,411,851,437"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <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"><a class="anchor" name="136945e703317bdf6e18d8cf511a5bfb"></a><!-- doxytag: member="Xapian::Error::get_type" ref="136945e703317bdf6e18d8cf511a5bfb" args="() const " --> const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#136945e703317bdf6e18d8cf511a5bfb">get_type</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The type of this error (e.g. "DocNotFoundError".). <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea05df48ea71dfd045da28ab984cdaa3"></a><!-- doxytag: member="Xapian::Error::get_msg" ref="ea05df48ea71dfd045da28ab984cdaa3" args="() const " --> const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#ea05df48ea71dfd045da28ab984cdaa3">get_msg</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Message giving details of the error, intended for human consumption. <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#90c683965555b4bc86b08e8667170e44">get_context</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Optional context information. <a href="#90c683965555b4bc86b08e8667170e44"></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#6f94a579f8e176f85c6fb036592dab61">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="#6f94a579f8e176f85c6fb036592dab61"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd64e380eb6d864dc907ee62c1f58a74"></a><!-- doxytag: member="Xapian::Error::get_description" ref="bd64e380eb6d864dc907ee62c1f58a74" args="() const " --> std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Error.html#bd64e380eb6d864dc907ee62c1f58a74">get_description</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return a string describing this object. <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. <hr><h2>Member Function Documentation</h2> <a class="anchor" name="90c683965555b4bc86b08e8667170e44"></a><!-- doxytag: member="Xapian::Error::get_context" ref="90c683965555b4bc86b08e8667170e44" 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> 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="6f94a579f8e176f85c6fb036592dab61"></a><!-- doxytag: member="Xapian::Error::get_error_string" ref="6f94a579f8e176f85c6fb036592dab61" 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> 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> <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> </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>