docs: ws
[awesomized/libmemcached] / docs / source / libmemcached / memcached_last_error.rst
1 Retrieving Error Codes and Messages
2 ===================================
3
4 SYNOPSIS
5 --------
6
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
9
10 .. function:: memcached_return_t memcached_last_error(const memcached_st *)
11
12 .. function:: const char *memcached_last_error_message(const memcached_st *)
13
14 .. function:: int memcached_last_error_errno(const memcached_st *)
15
16 DESCRIPTION
17 -----------
18
19 Retrieve error codes and messages.
20
21 RETURN VALUE
22 ------------
23
24 `memcached_last_error` returns the last error code.
25
26 `memcached_last_error_message` returns the last error message. If this error
27 came from a specific server, its hostname and port will be provided in the error
28 message. Any error message will be returned as 'const char \*' which does not
29 need to be de-allocated. NULL will be returned if no error has occurred.
30
31 `memcached_last_error_errno` returns any last local error code obtained from
32 :manpage:`errno(3)`.
33
34 SEE ALSO
35 --------
36
37 .. only:: man
38
39 :manpage:`memcached(1)`
40 :manpage:`libmemcached(3)`
41 :manpage:`memcached_strerror(3)`
42
43 .. only:: html
44
45 * :manpage:`memcached(1)`
46 * :doc:`../libmemcached`
47 * :doc:`memcached_strerror`