09ed37e99cb292effdc888ffbccc1f240b4da8e2
[awesomized/libmemcached] / docs / source / libmemcached / memcached_strerror.rst
1 Converting Error Codes to Messages
2 ==================================
3
4 SYNOPSIS
5 --------
6
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
9
10 .. function:: const char *memcached_strerror(memcached_st *ptr, memcached_return_t rc)
11
12 DESCRIPTION
13 -----------
14
15 `memcached_strerror` takes a `memcached_return_t` value and returns a string
16 describing the error.
17
18 This string must not be modified by the application.
19
20 `memcached_return_t` values are returned from nearly all libmemcached(3)
21 functions.
22
23 `memcached_return_t` values are of an enum type so that you can set up responses
24 with switch/case and know that you are capturing all possible return values.
25
26 RETURN VALUE
27 ------------
28
29 `memcached_strerror` returns a string describing a `memcached_return_t` value.
30
31 SEE ALSO
32 --------
33
34 .. only:: man
35
36 :manpage:`memcached(1)`
37 :manpage:`libmemcached(3)`
38
39 .. only:: html
40
41 * :manpage:`memcached(1)`
42 * :doc:`../libmemcached`
43