# Xapian::ErrorHandler Class Reference

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

List of all members.

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

## 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:

  | error | The Xapian::Error object under consideration.

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

- xapian/errorhandler.h