Public Member Functions | List of all members
Xapian::ErrorHandler Class Referenceabstract

Decide if a Xapian::Error exception should be ignored. More...

+ Inheritance diagram for Xapian::ErrorHandler:

Public Member Functions

 ErrorHandler ()
 Default constructor.
 
virtual ~ErrorHandler ()
 We require a virtual destructor because we have virtual methods.
 
void operator() (Xapian::Error &error)
 Handle a Xapian::Error object. More...
 
ErrorHandlerrelease ()
 
const ErrorHandlerrelease () const
 

Detailed Description

Decide if a Xapian::Error exception should be ignored.

You can create your own subclass of this class and pass in an instance of it when you construct a Xapian::Enquire object. Xapian::Error exceptions which happen during the match process are passed to this object and it can decide whether they should propagate or whether Enquire should attempt to continue.

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).

Member Function Documentation

void Xapian::ErrorHandler::operator() ( Xapian::Error error)

Handle a Xapian::Error object.

This method is called when a Xapian::Error object is thrown and caught inside Enquire. If this is the first ErrorHandler that the Error has been passed to, then the handle_error() virtual method is called, which allows the API user to decide how to handle the error.

Parameters
errorThe Xapian::Error object under consideration.

The documentation for this class was generated from the following file:

Documentation for Xapian (version 1.4.0).
Generated on Wed Oct 12 2016 by Doxygen 1.8.11.