1 Retrieving Error Codes and Messages
2 ===================================
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
10 .. function:: memcached_return_t memcached_last_error(const memcached_st *ptr)
12 :param ptr: pointer to an initialized `memcached_st` struct
13 :returns: `memcached_return_t` indicating success of last operation
15 .. function:: const char *memcached_last_error_message(const memcached_st *ptr)
17 :param ptr: pointer to an initialized `memcached_st` struct
18 :returns: message describing the status of last operation
20 .. function:: int memcached_last_error_errno(const memcached_st *ptr)
22 :param ptr: pointer to an initialized `memcached_st` struct
23 :returns: :manpage:`errno(3)` (if any) of last operation
28 Retrieve error codes and messages.
33 `memcached_last_error` returns the last error code.
35 `memcached_last_error_message` returns the last error message. If this error
36 came from a specific server, its hostname and port will be provided in the error
37 message. Any error message will be returned as 'const char \*' which does not
38 need to be de-allocated. NULL will be returned if no error has occurred.
40 `memcached_last_error_errno` returns any last local error code obtained from
48 :manpage:`memcached(1)`
50 :manpage:`libmemcached(3)`
51 :manpage:`memcached_strerror(3)`
55 * :manpage:`memcached(1)`
57 * :doc:`../libmemcached`
58 * :doc:`memcached_strerror`