# include/xapian/error.h File Reference

Classes for exception handling. More...

`#include <string>`
`#include <xapian/errortypes.h>`

Include dependency graph for error.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces

namespace | Xapian

## Classes

class | Xapian::Error
| Base class for all Xapian-specific errors reported. More...

## Defines

#define | XAPIAN_DEFINE_ERROR_BASECLASS(a, b)
| For internal use only. Macro magic to define error base class.
#define | XAPIAN_DEFINE_ERROR_CLASS(a, b)
| For internal use only. Macro magic to define derived error class.

## Detailed Description

Classes for exception handling.

## Define Documentation

#define XAPIAN_DEFINE_ERROR_BASECLASS | ( | a,
|  | b |  | ) |

Value:

    class a : public b { \
        protected: \ \
            a(const std::string &msg_, \
              const std::string &context_, \
              const std::string &type_, \
              int errno_value_) : b(msg_, context_, type_, errno_value_) {} \
    }

For internal use only.

Macro magic to define error base class.

#define XAPIAN_DEFINE_ERROR_CLASS | ( | a,
|  | b |  | ) |

Value:

    class a : public b { \
        public: \ \
            a(const std::string &msg_, \
              const std::string &context_ = "", \
              int errno_value_ = 0) : b(msg_, context_, #a, errno_value_) {} \ \
            a(const std::string &msg_, \
              int errno_value_) : b(msg_, "", #a, errno_value_) {} \
        protected: \ \
            a(const std::string &msg_, \
              const std::string &context_, \
              const std::string &type_, \
              int errno_value_) : b(msg_, context_, type_, errno_value_) {} \
    }

For internal use only.

Macro magic to define derived error class.