d2da69638174a5c015a3ab067d83fa1d988f5253
[m6w6/libmemcached] / lib / memcached_strerror.c
1 #include "common.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_STORED:
38 return "STORED";
39 case MEMCACHED_NOTFOUND:
40 return "NOT FOUND";
41 case MEMCACHED_MEMORY_ALLOCATION_FAILURE:
42 return "MEMORY ALLOCATION FAILURE";
43 case MEMCACHED_PARTIAL_READ:
44 return "PARTIAL READ";
45 case MEMCACHED_SOME_ERRORS:
46 return "SOME ERRORS WERE REPORTED";
47 case MEMCACHED_NO_SERVERS:
48 return "NO SERVERS DEFINED";
49 case MEMCACHED_END:
50 return "SERVER END";
51 case MEMCACHED_DELETED:
52 return "SERVER DELETE";
53 case MEMCACHED_VALUE:
54 return "SERVER VALUE";
55 case MEMCACHED_STAT:
56 return "STAT VALUE";
57 case MEMCACHED_ERRNO:
58 return "SYSTEM ERROR";
59 case MEMCACHED_FAIL_UNIX_SOCKET:
60 return "COULD NOT OPEN UNIX SOCKET";
61 case MEMCACHED_NOT_SUPPORTED:
62 return "ACTION NOT SUPPORTED";
63 case MEMCACHED_NO_KEY_PROVIDED:
64 return "A KEY LENGTH OF ZERO WAS PROVIDED";
65 case MEMCACHED_MAXIMUM_RETURN:
66 return "Gibberish returned!";
67 default:
68 return "Gibberish returned!";
69 };
70 }