xapian-core  1.4.25
Public Member Functions | Private Member Functions | List of all members
Xapian::AssertionError Class Reference

AssertionError is thrown if a logical assertion inside Xapian fails. More...

#include <error.h>

+ Inheritance diagram for Xapian::AssertionError:
+ Collaboration diagram for Xapian::AssertionError:

Public Member Functions

 AssertionError (const std::string &msg_, const std::string &context_=std::string(), int errno_=0)
 General purpose constructor. More...
 
 AssertionError (const std::string &msg_, int errno_)
 Construct from message and errno value. More...
 
- Public Member Functions inherited from Xapian::Error
const char * get_type () const
 The type of this error (e.g. "DocNotFoundError".) More...
 
const std::string & get_msg () const
 Message giving details of the error, intended for human consumption. More...
 
const std::string & get_context () const
 Optional context information. More...
 
const char * get_error_string () const
 Returns any system error string associated with this exception. More...
 
std::string get_description () const
 Return a string describing this object. More...
 

Private Member Functions

 AssertionError (const std::string &msg_, const std::string &context_, const char *error_string_)
 Private constructor for use by remote backend. More...
 
 AssertionError (const std::string &msg_, const std::string &context_, const char *type_, const char *error_string_)
 Constructor for use by constructors of derived classes. More...
 
 AssertionError (const std::string &msg_, const std::string &context_, const char *type_, int errno_)
 Constructor for use by constructors of derived classes. More...
 

Detailed Description

AssertionError is thrown if a logical assertion inside Xapian fails.

In a debug build of Xapian, a failed assertion in the core library code will cause AssertionError to be thrown.

This represents a bug in Xapian (either an invariant, precondition, etc has been violated, or the assertion is incorrect!)

Definition at line 199 of file error.h.

Constructor & Destructor Documentation

◆ AssertionError() [1/5]

Xapian::AssertionError::AssertionError ( const std::string &  msg_,
const std::string &  context_,
const char *  error_string_ 
)
inlineprivate

Private constructor for use by remote backend.

Parameters
error_string_Optional string describing error. May be NULL.

Definition at line 206 of file error.h.

◆ AssertionError() [2/5]

Xapian::AssertionError::AssertionError ( const std::string &  msg_,
const std::string &  context_ = std::string(),
int  errno_ = 0 
)
inlineexplicit

General purpose constructor.

Parameters
msg_Message giving details of the error, intended for human consumption.
context_Optional context information for this error.
errno_Optional errno value associated with this error.

Definition at line 215 of file error.h.

◆ AssertionError() [3/5]

Xapian::AssertionError::AssertionError ( const std::string &  msg_,
int  errno_ 
)
inline

Construct from message and errno value.

Parameters
msg_Message giving details of the error, intended for human consumption.
errno_Optional errno value associated with this error.

Definition at line 223 of file error.h.

◆ AssertionError() [4/5]

Xapian::AssertionError::AssertionError ( const std::string &  msg_,
const std::string &  context_,
const char *  type_,
const char *  error_string_ 
)
inlineprivate

Constructor for use by constructors of derived classes.

Definition at line 229 of file error.h.

◆ AssertionError() [5/5]

Xapian::AssertionError::AssertionError ( const std::string &  msg_,
const std::string &  context_,
const char *  type_,
int  errno_ 
)
inlineprivate

Constructor for use by constructors of derived classes.

Definition at line 235 of file error.h.


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