xapian-core  1.4.20
error.h
Go to the documentation of this file.
1 
4 /* Warning: This file is generated by ./generate-exceptions - do not modify directly! */
5 /* Copyright (C) 2003,2004,2006,2007,2008,2009,2011,2015,2019 Olly Betts
6  * Copyright (C) 2007 Richard Boulton
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef XAPIAN_INCLUDED_ERROR_H
24 #define XAPIAN_INCLUDED_ERROR_H
25 
26 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
27 # error Never use <xapian/error.h> directly; include <xapian.h> instead.
28 #endif
29 
30 #include <string>
31 #include <xapian/attributes.h>
32 #include <xapian/visibility.h>
33 
34 namespace Xapian {
35 
36 class ErrorHandler;
37 
44  // ErrorHandler needs to be able to access Error::already_handled.
45  friend class ErrorHandler;
46 
48  std::string msg;
49 
57  std::string context;
58 
63  mutable std::string error_string;
64 
66  const char * type;
67 
83  int my_errno;
84 
87 
89  void operator=(const Error &o);
90 
91  protected:
95  Error(const std::string &msg_, const std::string &context_,
96  const char * type_, const char * error_string_);
97 
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) { }
105 
106  public:
107 #if __cplusplus >= 201103L
108 
113  Error(const Error&) = default;
114 #endif
115 
117  const char * XAPIAN_NOTHROW(get_type() const) {
118  return type + 1;
119  }
120 
122  const std::string & XAPIAN_NOTHROW(get_msg() const) {
123  return msg;
124  }
125 
133  const std::string & XAPIAN_NOTHROW(get_context() const) {
134  return context;
135  }
136 
143  const char * get_error_string() const;
144 
146  std::string get_description() const;
147 };
148 
155  protected:
159  LogicError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
160  : Error(msg_, context_, type_, error_string_) {}
161 
165  LogicError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
166  : Error(msg_, context_, type_, errno_) {}
167 };
168 
177  protected:
181  RuntimeError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
182  : Error(msg_, context_, type_, error_string_) {}
183 
187  RuntimeError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
188  : Error(msg_, context_, type_, errno_) {}
189 };
190 
200  public:
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_) {}
223  AssertionError(const std::string &msg_, int errno_)
224  : LogicError(msg_, std::string(), "\000AssertionError", errno_) {}
225  protected:
229  AssertionError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
230  : LogicError(msg_, context_, type_, error_string_) {}
231 
235  AssertionError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
236  : LogicError(msg_, context_, type_, errno_) {}
237 };
238 
242  public:
248  InvalidArgumentError(const std::string &msg_, const std::string &context_, const char * error_string_)
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_) {}
265  InvalidArgumentError(const std::string &msg_, int errno_)
266  : LogicError(msg_, std::string(), "\001InvalidArgumentError", errno_) {}
267  protected:
271  InvalidArgumentError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
272  : LogicError(msg_, context_, type_, error_string_) {}
273 
277  InvalidArgumentError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
278  : LogicError(msg_, context_, type_, errno_) {}
279 };
280 
284  public:
290  InvalidOperationError(const std::string &msg_, const std::string &context_, const char * error_string_)
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_) {}
307  InvalidOperationError(const std::string &msg_, int errno_)
308  : LogicError(msg_, std::string(), "\002InvalidOperationError", errno_) {}
309  protected:
313  InvalidOperationError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
314  : LogicError(msg_, context_, type_, error_string_) {}
315 
319  InvalidOperationError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
320  : LogicError(msg_, context_, type_, errno_) {}
321 };
322 
326  public:
332  UnimplementedError(const std::string &msg_, const std::string &context_, const char * error_string_)
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_) {}
349  UnimplementedError(const std::string &msg_, int errno_)
350  : LogicError(msg_, std::string(), "\003UnimplementedError", errno_) {}
351  protected:
355  UnimplementedError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
356  : LogicError(msg_, context_, type_, error_string_) {}
357 
361  UnimplementedError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
362  : LogicError(msg_, context_, type_, errno_) {}
363 };
364 
368  public:
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_) {}
391  DatabaseError(const std::string &msg_, int errno_)
392  : RuntimeError(msg_, std::string(), "\004DatabaseError", errno_) {}
393  protected:
397  DatabaseError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
398  : RuntimeError(msg_, context_, type_, error_string_) {}
399 
403  DatabaseError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
404  : RuntimeError(msg_, context_, type_, errno_) {}
405 };
406 
410  public:
416  DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char * error_string_)
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_) {}
433  DatabaseCorruptError(const std::string &msg_, int errno_)
434  : DatabaseError(msg_, std::string(), "\005DatabaseCorruptError", errno_) {}
435  protected:
439  DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
440  : DatabaseError(msg_, context_, type_, error_string_) {}
441 
445  DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
446  : DatabaseError(msg_, context_, type_, errno_) {}
447 };
448 
452  public:
458  DatabaseCreateError(const std::string &msg_, const std::string &context_, 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_) {}
475  DatabaseCreateError(const std::string &msg_, int errno_)
476  : DatabaseError(msg_, std::string(), "\006DatabaseCreateError", errno_) {}
477  protected:
481  DatabaseCreateError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
482  : DatabaseError(msg_, context_, type_, error_string_) {}
483 
487  DatabaseCreateError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
488  : DatabaseError(msg_, context_, type_, errno_) {}
489 };
490 
494  public:
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_) {}
517  DatabaseLockError(const std::string &msg_, int errno_)
518  : DatabaseError(msg_, std::string(), "\007DatabaseLockError", errno_) {}
519  protected:
523  DatabaseLockError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
524  : DatabaseError(msg_, context_, type_, error_string_) {}
525 
529  DatabaseLockError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
530  : DatabaseError(msg_, context_, type_, errno_) {}
531 };
532 
540  public:
546  DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char * error_string_)
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_) {}
563  DatabaseModifiedError(const std::string &msg_, int errno_)
564  : DatabaseError(msg_, std::string(), "\010DatabaseModifiedError", errno_) {}
565  protected:
569  DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
570  : DatabaseError(msg_, context_, type_, error_string_) {}
571 
575  DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
576  : DatabaseError(msg_, context_, type_, errno_) {}
577 };
578 
582  public:
588  DatabaseOpeningError(const std::string &msg_, const std::string &context_, 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_) {}
605  DatabaseOpeningError(const std::string &msg_, int errno_)
606  : DatabaseError(msg_, std::string(), "\011DatabaseOpeningError", errno_) {}
607  protected:
611  DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
612  : DatabaseError(msg_, context_, type_, error_string_) {}
613 
617  DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
618  : DatabaseError(msg_, context_, type_, errno_) {}
619 };
620 
633  public:
639  DatabaseVersionError(const std::string &msg_, const std::string &context_, const char * error_string_)
640  : DatabaseOpeningError(msg_, context_, "\012DatabaseVersionError", error_string_) {}
648  explicit DatabaseVersionError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0)
649  : DatabaseOpeningError(msg_, context_, "\012DatabaseVersionError", errno_) {}
656  DatabaseVersionError(const std::string &msg_, int errno_)
657  : DatabaseOpeningError(msg_, std::string(), "\012DatabaseVersionError", errno_) {}
658  protected:
662  DatabaseVersionError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
663  : DatabaseOpeningError(msg_, context_, type_, error_string_) {}
664 
668  DatabaseVersionError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
669  : DatabaseOpeningError(msg_, context_, type_, errno_) {}
670 };
671 
675  public:
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_) {}
698  DocNotFoundError(const std::string &msg_, int errno_)
699  : RuntimeError(msg_, std::string(), "\013DocNotFoundError", errno_) {}
700  protected:
704  DocNotFoundError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
705  : RuntimeError(msg_, context_, type_, error_string_) {}
706 
710  DocNotFoundError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
711  : RuntimeError(msg_, context_, type_, errno_) {}
712 };
713 
720  public:
726  FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char * error_string_)
727  : RuntimeError(msg_, context_, "\014FeatureUnavailableError", error_string_) {}
735  explicit FeatureUnavailableError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0)
736  : RuntimeError(msg_, context_, "\014FeatureUnavailableError", errno_) {}
743  FeatureUnavailableError(const std::string &msg_, int errno_)
744  : RuntimeError(msg_, std::string(), "\014FeatureUnavailableError", errno_) {}
745  protected:
749  FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
750  : RuntimeError(msg_, context_, type_, error_string_) {}
751 
755  FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
756  : RuntimeError(msg_, context_, type_, errno_) {}
757 };
758 
762  public:
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_) {}
785  InternalError(const std::string &msg_, int errno_)
786  : RuntimeError(msg_, std::string(), "\015InternalError", errno_) {}
787  protected:
791  InternalError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
792  : RuntimeError(msg_, context_, type_, error_string_) {}
793 
797  InternalError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
798  : RuntimeError(msg_, context_, type_, errno_) {}
799 };
800 
804  public:
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_) {}
827  NetworkError(const std::string &msg_, int errno_)
828  : RuntimeError(msg_, std::string(), "\016NetworkError", errno_) {}
829  protected:
833  NetworkError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
834  : RuntimeError(msg_, context_, type_, error_string_) {}
835 
839  NetworkError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
840  : RuntimeError(msg_, context_, type_, errno_) {}
841 };
842 
846  public:
852  NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char * error_string_)
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_) {}
869  NetworkTimeoutError(const std::string &msg_, int errno_)
870  : NetworkError(msg_, std::string(), "\017NetworkTimeoutError", errno_) {}
871  protected:
875  NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
876  : NetworkError(msg_, context_, type_, error_string_) {}
877 
881  NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
882  : NetworkError(msg_, context_, type_, errno_) {}
883 };
884 
888  public:
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_) {}
911  QueryParserError(const std::string &msg_, int errno_)
912  : RuntimeError(msg_, std::string(), "\020QueryParserError", errno_) {}
913  protected:
917  QueryParserError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
918  : RuntimeError(msg_, context_, type_, error_string_) {}
919 
923  QueryParserError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
924  : RuntimeError(msg_, context_, type_, errno_) {}
925 };
926 
930  public:
936  SerialisationError(const std::string &msg_, const std::string &context_, const char * error_string_)
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_) {}
953  SerialisationError(const std::string &msg_, int errno_)
954  : RuntimeError(msg_, std::string(), "\021SerialisationError", errno_) {}
955  protected:
959  SerialisationError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
960  : RuntimeError(msg_, context_, type_, error_string_) {}
961 
965  SerialisationError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
966  : RuntimeError(msg_, context_, type_, errno_) {}
967 };
968 
972  public:
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_) {}
995  RangeError(const std::string &msg_, int errno_)
996  : RuntimeError(msg_, std::string(), "\022RangeError", errno_) {}
997  protected:
1001  RangeError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
1002  : RuntimeError(msg_, context_, type_, error_string_) {}
1003 
1007  RangeError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
1008  : RuntimeError(msg_, context_, type_, errno_) {}
1009 };
1010 
1014  public:
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_) {}
1037  WildcardError(const std::string &msg_, int errno_)
1038  : RuntimeError(msg_, std::string(), "\023WildcardError", errno_) {}
1039  protected:
1043  WildcardError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
1044  : RuntimeError(msg_, context_, type_, error_string_) {}
1045 
1049  WildcardError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
1050  : RuntimeError(msg_, context_, type_, errno_) {}
1051 };
1052 
1056  public:
1062  DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char * error_string_)
1063  : DatabaseOpeningError(msg_, context_, "\024DatabaseNotFoundError", error_string_) {}
1071  explicit DatabaseNotFoundError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0)
1072  : DatabaseOpeningError(msg_, context_, "\024DatabaseNotFoundError", errno_) {}
1079  DatabaseNotFoundError(const std::string &msg_, int errno_)
1080  : DatabaseOpeningError(msg_, std::string(), "\024DatabaseNotFoundError", errno_) {}
1081  protected:
1085  DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
1086  : DatabaseOpeningError(msg_, context_, type_, error_string_) {}
1087 
1091  DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
1092  : DatabaseOpeningError(msg_, context_, type_, errno_) {}
1093 };
1094 
1098  public:
1104  DatabaseClosedError(const std::string &msg_, const std::string &context_, 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_) {}
1121  DatabaseClosedError(const std::string &msg_, int errno_)
1122  : DatabaseError(msg_, std::string(), "\025DatabaseClosedError", errno_) {}
1123  protected:
1127  DatabaseClosedError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_)
1128  : DatabaseError(msg_, context_, type_, error_string_) {}
1129 
1133  DatabaseClosedError(const std::string &msg_, const std::string &context_, const char * type_, int errno_)
1134  : DatabaseError(msg_, context_, type_, errno_) {}
1135 };
1136 
1137 }
1138 
1139 #endif /* XAPIAN_INCLUDED_ERROR_H */
UnimplementedError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:332
RangeError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:987
DatabaseError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:397
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
QueryParserError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:923
DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:1062
RangeError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:978
DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:445
WildcardError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:1020
DatabaseCreateError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:467
Indicates an attempt to access a closed database.
Definition: error.h:1097
SerialisationError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:936
DatabaseOpeningError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:597
DatabaseVersionError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:656
DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:1091
InvalidArgumentError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:265
DatabaseClosedError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:1127
NetworkTimeoutError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:861
DatabaseCorruptError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:425
The base class for exceptions indicating errors in the program logic.
Definition: error.h:154
UnimplementedError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:349
DatabaseClosedError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:1104
DatabaseModifiedError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:555
DatabaseLockError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:509
InvalidOperationError indicates the API was used in an invalid way.
Definition: error.h:283
DatabaseOpeningError indicates failure to open a database.
Definition: error.h:581
DocNotFoundError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:704
DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:575
Indicates a timeout expired while communicating with a remote database.
Definition: error.h:845
DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:611
The base class for exceptions indicating errors only detectable at runtime.
Definition: error.h:176
DatabaseVersionError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:639
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.
Definition: error.h:1049
DocNotFoundError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:681
const std::string & get_msg() const
Message giving details of the error, intended for human consumption.
Definition: error.h:122
DatabaseNotFoundError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:1071
DocNotFoundError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:710
WildcardError indicates an error expanding a wildcarded query.
Definition: error.h:1013
DatabaseLockError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:517
UnimplementedError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:361
LogicError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:165
STL namespace.
std::string error_string
The error string derived from my_errno.
Definition: error.h:63
Indicates a query string can&#39;t be parsed.
Definition: error.h:887
DatabaseOpeningError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:605
InvalidOperationError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:319
FeatureUnavailableError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:735
InternalError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:777
NetworkError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:827
DatabaseNotFoundError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:1085
const char * get_type() const
The type of this error (e.g. "DocNotFoundError".)
Definition: error.h:117
#define false
Definition: header.h:9
RangeError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:1001
DocNotFoundError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:698
NetworkError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:810
#define XAPIAN_VISIBILITY_DEFAULT
Definition: visibility.h:28
AssertionError is thrown if a logical assertion inside Xapian fails.
Definition: error.h:199
SerialisationError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:959
QueryParserError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:903
SerialisationError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:945
DatabaseVersionError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:662
Decide if a Xapian::Error exception should be ignored.
Definition: errorhandler.h:50
DatabaseClosedError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:1133
DatabaseNotFoundError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:1079
RangeError indicates an attempt to access outside the bounds of a container.
Definition: error.h:971
InvalidArgumentError indicates an invalid parameter value was passed to the API.
Definition: error.h:241
LogicError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:159
InternalError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:785
DocNotFoundError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:690
DatabaseCreateError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:481
UnimplementedError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:341
NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:875
DatabaseModifiedError indicates a database was modified.
Definition: error.h:539
DatabaseLockError indicates failure to lock a database.
Definition: error.h:493
InvalidArgumentError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:257
InternalError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:797
Indicates an error in the std::string serialisation of an object.
Definition: error.h:929
AssertionError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:223
WildcardError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:1043
Indicates an attempt to use a feature which is unavailable.
Definition: error.h:719
Define XAPIAN_VISIBILITY_* macros.
InternalError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:768
DatabaseCreateError indicates a failure to create a database.
Definition: error.h:451
FeatureUnavailableError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:743
InvalidOperationError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:313
DatabaseError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:374
NetworkError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:819
InvalidArgumentError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:271
DatabaseClosedError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:1113
FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:726
DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:439
FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:755
DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:546
DatabaseError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:403
NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:881
DatabaseLockError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:523
DatabaseLockError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:500
DatabaseLockError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:529
bool already_handled
True if this error has already been passed to an ErrorHandler.
Definition: error.h:86
FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:749
std::string msg
Message giving details of the error, intended for human consumption.
Definition: error.h:48
Indicates an attempt to access a database not present.
Definition: error.h:1055
RangeError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:995
UnimplementedError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:355
NetworkError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:839
DatabaseError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:391
AssertionError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:229
QueryParserError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:911
Indicates an attempt to access a document not present in the database.
Definition: error.h:674
DatabaseVersionError indicates that a database is in an unsupported format.
Definition: error.h:632
DatabaseCorruptError indicates database corruption was detected.
Definition: error.h:409
InternalError indicates a runtime problem of some sort.
Definition: error.h:761
AssertionError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:215
InvalidArgumentError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:277
DatabaseModifiedError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:563
SerialisationError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:965
std::string context
Optional context information.
Definition: error.h:57
DatabaseError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:383
const char * type
The type of this error (e.g. DocNotFoundError.)
Definition: error.h:66
DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:617
All exceptions thrown by Xapian are subclasses of Xapian::Error.
Definition: error.h:43
QueryParserError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:894
Indicates a problem communicating with a remote database.
Definition: error.h:803
QueryParserError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:917
InternalError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:791
InvalidOperationError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:290
DatabaseVersionError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:668
NetworkError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:833
InvalidArgumentError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:248
DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:569
AssertionError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:206
RuntimeError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:187
RangeError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:1007
SerialisationError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:953
DatabaseCreateError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:475
DatabaseClosedError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:1121
DatabaseError indicates some sort of database related error.
Definition: error.h:367
const std::string & get_context() const
Optional context information.
Definition: error.h:133
Error(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:101
DatabaseCorruptError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:433
InvalidOperationError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:299
RuntimeError(const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
Constructor for use by constructors of derived classes.
Definition: error.h:181
DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:588
DatabaseVersionError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:648
InvalidOperationError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:307
NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:852
DatabaseCreateError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:458
int my_errno
Optional value of &#39;errno&#39; associated with this error.
Definition: error.h:83
DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char *error_string_)
Private constructor for use by remote backend.
Definition: error.h:416
WildcardError(const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
General purpose constructor.
Definition: error.h:1029
NetworkTimeoutError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:869
UnimplementedError indicates an attempt to use an unimplemented feature.
Definition: error.h:325
DatabaseCreateError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:487
AssertionError(const std::string &msg_, const std::string &context_, const char *type_, int errno_)
Constructor for use by constructors of derived classes.
Definition: error.h:235
WildcardError(const std::string &msg_, int errno_)
Construct from message and errno value.
Definition: error.h:1037