23 #ifndef XAPIAN_INCLUDED_ERROR_H 24 #define XAPIAN_INCLUDED_ERROR_H 26 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD 27 # error Never use <xapian/error.h> directly; include <xapian.h> instead. 89 void operator=(
const Error &o);
95 Error(
const std::string &msg_,
const std::string &context_,
96 const char * type_,
const char * error_string_);
101 Error(
const std::string &msg_,
const std::string &context_,
102 const char * type_,
int errno_)
103 : msg(msg_), context(context_), error_string(), type(type_),
104 my_errno(errno_), already_handled(
false) { }
107 #if __cplusplus >= 201103L 122 const std::string & XAPIAN_NOTHROW(
get_msg()
const) {
143 const char * get_error_string()
const;
146 std::string get_description()
const;
159 LogicError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
160 :
Error(msg_, context_, type_, error_string_) {}
165 LogicError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
166 :
Error(msg_, context_, type_, errno_) {}
181 RuntimeError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
182 :
Error(msg_, context_, type_, error_string_) {}
187 RuntimeError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
188 :
Error(msg_, context_, type_, errno_) {}
206 AssertionError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
207 :
LogicError(msg_, context_,
"\000AssertionError", error_string_) {}
215 explicit AssertionError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
216 :
LogicError(msg_, context_,
"\000AssertionError", errno_) {}
224 :
LogicError(msg_,
std::string(),
"\000AssertionError", errno_) {}
229 AssertionError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
230 :
LogicError(msg_, context_, type_, error_string_) {}
235 AssertionError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
236 :
LogicError(msg_, context_, type_, errno_) {}
249 :
LogicError(msg_, context_,
"\001InvalidArgumentError", error_string_) {}
257 explicit InvalidArgumentError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
258 :
LogicError(msg_, context_,
"\001InvalidArgumentError", errno_) {}
266 :
LogicError(msg_,
std::string(),
"\001InvalidArgumentError", errno_) {}
271 InvalidArgumentError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
272 :
LogicError(msg_, context_, type_, error_string_) {}
278 :
LogicError(msg_, context_, type_, errno_) {}
291 :
LogicError(msg_, context_,
"\002InvalidOperationError", error_string_) {}
299 explicit InvalidOperationError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
300 :
LogicError(msg_, context_,
"\002InvalidOperationError", errno_) {}
308 :
LogicError(msg_,
std::string(),
"\002InvalidOperationError", errno_) {}
313 InvalidOperationError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
314 :
LogicError(msg_, context_, type_, error_string_) {}
320 :
LogicError(msg_, context_, type_, errno_) {}
333 :
LogicError(msg_, context_,
"\003UnimplementedError", error_string_) {}
341 explicit UnimplementedError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
342 :
LogicError(msg_, context_,
"\003UnimplementedError", errno_) {}
350 :
LogicError(msg_,
std::string(),
"\003UnimplementedError", errno_) {}
355 UnimplementedError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
356 :
LogicError(msg_, context_, type_, error_string_) {}
361 UnimplementedError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
362 :
LogicError(msg_, context_, type_, errno_) {}
374 DatabaseError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
375 :
RuntimeError(msg_, context_,
"\004DatabaseError", error_string_) {}
383 explicit DatabaseError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
384 :
RuntimeError(msg_, context_,
"\004DatabaseError", errno_) {}
397 DatabaseError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
403 DatabaseError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
417 :
DatabaseError(msg_, context_,
"\005DatabaseCorruptError", error_string_) {}
425 explicit DatabaseCorruptError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
426 :
DatabaseError(msg_, context_,
"\005DatabaseCorruptError", errno_) {}
439 DatabaseCorruptError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
459 :
DatabaseError(msg_, context_,
"\006DatabaseCreateError", error_string_) {}
467 explicit DatabaseCreateError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
468 :
DatabaseError(msg_, context_,
"\006DatabaseCreateError", errno_) {}
481 DatabaseCreateError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
500 DatabaseLockError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
501 :
DatabaseError(msg_, context_,
"\007DatabaseLockError", error_string_) {}
509 explicit DatabaseLockError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
510 :
DatabaseError(msg_, context_,
"\007DatabaseLockError", errno_) {}
523 DatabaseLockError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
529 DatabaseLockError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
547 :
DatabaseError(msg_, context_,
"\010DatabaseModifiedError", error_string_) {}
555 explicit DatabaseModifiedError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
556 :
DatabaseError(msg_, context_,
"\010DatabaseModifiedError", errno_) {}
564 :
DatabaseError(msg_,
std::string(),
"\010DatabaseModifiedError", errno_) {}
569 DatabaseModifiedError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
589 :
DatabaseError(msg_, context_,
"\011DatabaseOpeningError", error_string_) {}
597 explicit DatabaseOpeningError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
598 :
DatabaseError(msg_, context_,
"\011DatabaseOpeningError", errno_) {}
611 DatabaseOpeningError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
648 explicit DatabaseVersionError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
662 DatabaseVersionError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
681 DocNotFoundError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
682 :
RuntimeError(msg_, context_,
"\013DocNotFoundError", error_string_) {}
690 explicit DocNotFoundError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
691 :
RuntimeError(msg_, context_,
"\013DocNotFoundError", errno_) {}
704 DocNotFoundError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
710 DocNotFoundError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
727 :
RuntimeError(msg_, context_,
"\014FeatureUnavailableError", error_string_) {}
736 :
RuntimeError(msg_, context_,
"\014FeatureUnavailableError", errno_) {}
744 :
RuntimeError(msg_,
std::string(),
"\014FeatureUnavailableError", errno_) {}
768 InternalError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
769 :
RuntimeError(msg_, context_,
"\015InternalError", error_string_) {}
777 explicit InternalError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
778 :
RuntimeError(msg_, context_,
"\015InternalError", errno_) {}
791 InternalError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
797 InternalError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
810 NetworkError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
811 :
RuntimeError(msg_, context_,
"\016NetworkError", error_string_) {}
819 explicit NetworkError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
820 :
RuntimeError(msg_, context_,
"\016NetworkError", errno_) {}
833 NetworkError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
839 NetworkError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
853 :
NetworkError(msg_, context_,
"\017NetworkTimeoutError", error_string_) {}
861 explicit NetworkTimeoutError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
862 :
NetworkError(msg_, context_,
"\017NetworkTimeoutError", errno_) {}
870 :
NetworkError(msg_,
std::string(),
"\017NetworkTimeoutError", errno_) {}
875 NetworkTimeoutError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
894 QueryParserError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
895 :
RuntimeError(msg_, context_,
"\020QueryParserError", error_string_) {}
903 explicit QueryParserError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
904 :
RuntimeError(msg_, context_,
"\020QueryParserError", errno_) {}
917 QueryParserError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
923 QueryParserError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
937 :
RuntimeError(msg_, context_,
"\021SerialisationError", error_string_) {}
945 explicit SerialisationError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
946 :
RuntimeError(msg_, context_,
"\021SerialisationError", errno_) {}
954 :
RuntimeError(msg_,
std::string(),
"\021SerialisationError", errno_) {}
959 SerialisationError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
965 SerialisationError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
978 RangeError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
979 :
RuntimeError(msg_, context_,
"\022RangeError", error_string_) {}
987 explicit RangeError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
988 :
RuntimeError(msg_, context_,
"\022RangeError", errno_) {}
1001 RangeError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
1002 :
RuntimeError(msg_, context_, type_, error_string_) {}
1007 RangeError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
1020 WildcardError(
const std::string &msg_,
const std::string &context_,
const char * error_string_)
1021 :
RuntimeError(msg_, context_,
"\023WildcardError", error_string_) {}
1029 explicit WildcardError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
1030 :
RuntimeError(msg_, context_,
"\023WildcardError", errno_) {}
1043 WildcardError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
1044 :
RuntimeError(msg_, context_, type_, error_string_) {}
1049 WildcardError(
const std::string &msg_,
const std::string &context_,
const char * type_,
int errno_)
1085 DatabaseNotFoundError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
1105 :
DatabaseError(msg_, context_,
"\025DatabaseClosedError", error_string_) {}
1113 explicit DatabaseClosedError(
const std::string &msg_,
const std::string &context_ = std::string(),
int errno_ = 0)
1114 :
DatabaseError(msg_, context_,
"\025DatabaseClosedError", errno_) {}
1127 DatabaseClosedError(
const std::string &msg_,
const std::string &context_,
const char * type_,
const char * error_string_)
UnimplementedError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
RangeError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
DatabaseError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
The Xapian namespace contains public interfaces for the Xapian library.
QueryParserError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
RangeError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
WildcardError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseCreateError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Indicates an attempt to access a closed database.
SerialisationError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseOpeningError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
DatabaseVersionError(const std::string &msg_, int errno_)
Construct from message and errno value.
DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
InvalidArgumentError(const std::string &msg_, int errno_)
Construct from message and errno value.
DatabaseClosedError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
NetworkTimeoutError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
DatabaseCorruptError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
The base class for exceptions indicating errors in the program logic.
UnimplementedError(const std::string &msg_, int errno_)
Construct from message and errno value.
DatabaseClosedError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseModifiedError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
DatabaseLockError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
InvalidOperationError indicates the API was used in an invalid way.
DatabaseOpeningError indicates failure to open a database.
DocNotFoundError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Indicates a timeout expired while communicating with a remote database.
DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
The base class for exceptions indicating errors only detectable at runtime.
DatabaseVersionError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Compiler attribute macros.
WildcardError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
DocNotFoundError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
const std::string & get_msg() const
Message giving details of the error, intended for human consumption.
DatabaseNotFoundError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
DocNotFoundError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
WildcardError indicates an error expanding a wildcarded query.
DatabaseLockError(const std::string &msg_, int errno_)
Construct from message and errno value.
UnimplementedError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
LogicError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
std::string error_string
The error string derived from my_errno.
Indicates a query string can't be parsed.
DatabaseOpeningError(const std::string &msg_, int errno_)
Construct from message and errno value.
InvalidOperationError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
FeatureUnavailableError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
InternalError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
NetworkError(const std::string &msg_, int errno_)
Construct from message and errno value.
DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
const char * get_type() const
The type of this error (e.g. "DocNotFoundError".)
RangeError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
DocNotFoundError(const std::string &msg_, int errno_)
Construct from message and errno value.
NetworkError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
#define XAPIAN_VISIBILITY_DEFAULT
AssertionError is thrown if a logical assertion inside Xapian fails.
SerialisationError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
QueryParserError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
SerialisationError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
DatabaseVersionError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Decide if a Xapian::Error exception should be ignored.
DatabaseClosedError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
DatabaseNotFoundError(const std::string &msg_, int errno_)
Construct from message and errno value.
RangeError indicates an attempt to access outside the bounds of a container.
InvalidArgumentError indicates an invalid parameter value was passed to the API.
LogicError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
InternalError(const std::string &msg_, int errno_)
Construct from message and errno value.
DocNotFoundError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
DatabaseCreateError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
UnimplementedError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
DatabaseModifiedError indicates a database was modified.
DatabaseLockError indicates failure to lock a database.
InvalidArgumentError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
InternalError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Indicates an error in the std::string serialisation of an object.
AssertionError(const std::string &msg_, int errno_)
Construct from message and errno value.
WildcardError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Indicates an attempt to use a feature which is unavailable.
Define XAPIAN_VISIBILITY_* macros.
InternalError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseCreateError indicates a failure to create a database.
FeatureUnavailableError(const std::string &msg_, int errno_)
Construct from message and errno value.
InvalidOperationError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
DatabaseError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
NetworkError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
InvalidArgumentError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
DatabaseClosedError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
DatabaseLockError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
DatabaseLockError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseLockError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
bool already_handled
True if this error has already been passed to an ErrorHandler.
FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
std::string msg
Message giving details of the error, intended for human consumption.
Indicates an attempt to access a database not present.
RangeError(const std::string &msg_, int errno_)
Construct from message and errno value.
UnimplementedError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
NetworkError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
DatabaseError(const std::string &msg_, int errno_)
Construct from message and errno value.
AssertionError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
QueryParserError(const std::string &msg_, int errno_)
Construct from message and errno value.
Indicates an attempt to access a document not present in the database.
DatabaseVersionError indicates that a database is in an unsupported format.
DatabaseCorruptError indicates database corruption was detected.
InternalError indicates a runtime problem of some sort.
AssertionError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
InvalidArgumentError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
DatabaseModifiedError(const std::string &msg_, int errno_)
Construct from message and errno value.
SerialisationError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
std::string context
Optional context information.
DatabaseError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
const char * type
The type of this error (e.g. DocNotFoundError.)
DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
All exceptions thrown by Xapian are subclasses of Xapian::Error.
QueryParserError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Indicates a problem communicating with a remote database.
QueryParserError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
InternalError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
InvalidOperationError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseVersionError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
NetworkError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
InvalidArgumentError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
AssertionError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
RuntimeError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
RangeError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
SerialisationError(const std::string &msg_, int errno_)
Construct from message and errno value.
DatabaseCreateError(const std::string &msg_, int errno_)
Construct from message and errno value.
DatabaseClosedError(const std::string &msg_, int errno_)
Construct from message and errno value.
DatabaseError indicates some sort of database related error.
const std::string & get_context() const
Optional context information.
Error(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
DatabaseCorruptError(const std::string &msg_, int errno_)
Construct from message and errno value.
InvalidOperationError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
RuntimeError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseVersionError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
InvalidOperationError(const std::string &msg_, int errno_)
Construct from message and errno value.
NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
DatabaseCreateError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
int my_errno
Optional value of 'errno' associated with this error.
DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
WildcardError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
NetworkTimeoutError(const std::string &msg_, int errno_)
Construct from message and errno value.
UnimplementedError indicates an attempt to use an unimplemented feature.
DatabaseCreateError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
AssertionError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
WildcardError(const std::string &msg_, int errno_)
Construct from message and errno value.