Removed dumb bug concerning set (was still using a buffer).
[m6w6/libmemcached] / lib / memcached_strerror.c
1 #include <memcached.h>
2
3 char *memcached_strerror(memcached_st *ptr, memcached_return rc)
4 {
5 switch (rc)
6 {
7 case MEMCACHED_SUCCESS:
8 return "SUCCESS";
9 case MEMCACHED_FAILURE:
10 return "FAILURE";
11 case MEMCACHED_HOST_LOCKUP_FAILURE:
12 return "HOSTNAME LOOKUP FAILURE";
13 case MEMCACHED_CONNECTION_FAILURE:
14 return "CONNECTION FAILURE";
15 case MEMCACHED_CONNECTION_BIND_FAILURE:
16 return "CONNECTION BIND FAILURE";
17 case MEMCACHED_READ_FAILURE:
18 return "READ FAILURE";
19 case MEMCACHED_UNKNOWN_READ_FAILURE:
20 return "UNKNOWN READ FAILURE";
21 case MEMCACHED_PROTOCOL_ERROR:
22 return "PROTOCOL ERROR";
23 case MEMCACHED_CLIENT_ERROR:
24 return "CLIENT ERROR";
25 case MEMCACHED_SERVER_ERROR:
26 return "SERVER ERROR";
27 case MEMCACHED_WRITE_FAILURE:
28 return "WRITE FAILURE";
29 case MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE:
30 return "CONNECTION SOCKET CREATE FAILURE";
31 case MEMCACHED_DATA_EXISTS:
32 return "CONNECTION DATA EXISTS";
33 case MEMCACHED_DATA_DOES_NOT_EXIST:
34 return "CONNECTION DATA DOES NOT EXIST";
35 case MEMCACHED_NOTSTORED:
36 return "NOT STORED";
37 case MEMCACHED_NOTFOUND:
38 return "NOT FOUND";
39 case MEMCACHED_MEMORY_ALLOCATION_FAILURE:
40 return "MEMORY ALLOCATION FAILURE";
41 case MEMCACHED_PARTIAL_READ:
42 return "PARTIAL READ";
43 case MEMCACHED_SOME_ERRORS:
44 return "SOME ERRORS WERE REPORTED ";
45 };
46 }