# Xapian::Error Class Reference

Base class for all Xapian-specific errors reported. More...

`#include <error.h>`

List of all members.

## Public Member Functions

std::string | get_msg () const
| Return a message describing the error.
std::string | get_type () const
| Return the type of the error.
std::string | get_context () const
| Get the context of the error.
int | get_errno () const
| Get the errno value associated with the error (or 0 if none).
virtual | ~Error ()
| Destructor.

## Protected Member Functions

| Error (const std::string &msg_, const std::string &context_, const std::string &type_, int errno_value_)
| Constructors are protected, since they can only be used by derived classes anyway.
| Error (const Error &o)

## Detailed Description

Base class for all Xapian-specific errors reported.

Instantiations of Xapian::Error (as opposed to subclasses) are forbidden.

## Constructor & Destructor Documentation

Xapian::Error::Error | ( | const std::string & | msg_,
|  | const std::string & | context_,
|  | const std::string & | type_,
|  | int | errno_value_
| ) | `[protected]`

| Constructors are protected, since they can only be used by derived classes anyway.

virtual Xapian::Error::~Error | ( |  | ) | `[inline, virtual]`

| Destructor.

## Member Function Documentation

std::string Xapian::Error::get_context | ( |  | ) | const`[inline]`

| Get the context of the error.

int Xapian::Error::get_errno | ( |  | ) | const`[inline]`

| Get the errno value associated with the error (or 0 if none).

std::string Xapian::Error::get_msg | ( |  | ) | const`[inline]`

| Return a message describing the error. This is in a human readable form.

std::string Xapian::Error::get_type | ( |  | ) | const`[inline]`

| Return the type of the error.

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

- include/xapian/error.h