Xapian::Error Class Reference

All exceptions thrown by Xapian are subclasses of Xapian::Error. More...

#include <error.h>

List of all members.

Public Member Functions

std::string get_type () const
 The type of this error (e.g. "DocNotFoundError".).
const std::string & get_msg () const
 Message giving details of the error, intended for human consumption.
const std::string & get_context () const
 Optional context information.
int get_errno () const
 Optional value of 'errno' associated with this error.

Friends

class ErrorHandler


Detailed Description

All exceptions thrown by Xapian are subclasses of Xapian::Error.

This class can not be instantiated directly - instead a subclass should be used.


Member Function Documentation

const std::string& Xapian::Error::get_context  )  const [inline]
 

Optional context information.

This context is intended for use by Xapian::ErrorHandler (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.

int Xapian::Error::get_errno  )  const [inline]
 

Optional value of 'errno' associated with this error.

If no 'errno' value is associated, returns 0.

const std::string& Xapian::Error::get_msg  )  const [inline]
 

Message giving details of the error, intended for human consumption.

std::string Xapian::Error::get_type  )  const [inline]
 

The type of this error (e.g. "DocNotFoundError".).


The documentation for this class was generated from the following file:
Documentation for Xapian (version 0.9.9).
Generated on 9 Nov 2006 by Doxygen 1.4.6.