29 #ifndef XAPIAN_UNITTEST 41 class Xapian_NetworkError {
45 explicit Xapian_NetworkError(
const char * msg_) : msg(msg_) { }
47 const char * get_description()
const {
return msg; }
53 throw Xapian_NetworkError(msg);
66 T len =
static_cast<unsigned char>(*(*p)++);
72 if (*p == end || shift > (
sizeof(T) * 8 / 7 * 7))
75 len |= T(ch & 0x7f) << shift;
77 }
while ((ch & 0x80) == 0);
88 if (out > T(end - *p)) {
125 unsigned long long & out)
Define the XAPIAN_NORETURN macro.
length encoded as a string
static void decode_length_and_check_(const char **p, const char *end, T &out)
Hierarchy of classes which Xapian can throw as exceptions.
static void decode_length_(const char **p, const char *end, T &out)
void decode_length_and_check(const char **p, const char *end, unsigned &out)
Decode a length encoded by encode_length.
Indicates a problem communicating with a remote database.
static void throw_network_error(const char *msg)
void decode_length(const char **p, const char *end, unsigned &out)
Decode a length encoded by encode_length.