xapian-core  2.0.0
pack.cc
Go to the documentation of this file.
1 
4 /* Copyright (C) 2019 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #include <config.h>
22 
23 #include "pack.h"
24 
25 #include <xapian/error.h>
26 
27 [[noreturn]]
28 void
30 {
31  const char* m;
32  if (p == NULL) {
33  m = "Insufficient serialised data";
34  } else {
35  m = "Serialised data overflowed type";
36  }
38 }
Indicates an error in the std::string serialisation of an object.
Definition: error.h:917
PositionList * p
Hierarchy of classes which Xapian can throw as exceptions.
void unpack_throw_serialisation_error(const char *p)
Throw appropriate SerialisationError.
Definition: pack.cc:29
Pack types into strings and unpack them again.