xapian-core
1.4.27
|
functions to convert classes to strings and back More...
Go to the source code of this file.
Namespaces | |
Xapian | |
The Xapian namespace contains public interfaces for the Xapian library. | |
Functions | |
std::string | serialise_error (const Xapian::Error &e) |
Serialise a Xapian::Error object to a string. More... | |
void | unserialise_error (const std::string &error_string, const std::string &prefix, const std::string &new_context) |
Unserialise a Xapian::Error object and throw it. More... | |
functions to convert classes to strings and back
Definition in file serialise-error.h.
std::string serialise_error | ( | const Xapian::Error & | e | ) |
Serialise a Xapian::Error object to a string.
e | The Xapian::Error object to serialise. |
Definition at line 33 of file serialise-error.cc.
References encode_length(), Xapian::Error::get_context(), Xapian::Error::get_error_string(), Xapian::Error::get_msg(), and Xapian::Error::get_type().
Referenced by RemoteServer::RemoteServer(), RemoteServer::run(), and test_serialiseerror1().
void unserialise_error | ( | const std::string & | error_string, |
const std::string & | prefix, | ||
const std::string & | new_context | ||
) |
Unserialise a Xapian::Error object and throw it.
Note: does not return!
error_string | The string to unserialise. |
prefix | Optional prefix to prepend to the unserialised Error's msg field. |
new_context | Optional context to replace the context in the error. If this is specified, any existing context will be noted in the Error's msg field. |
Definition at line 48 of file serialise-error.cc.
References decode_length_and_check().
Referenced by RemoteDatabase::get_message(), and test_serialiseerror1().