From: Brian Aker Date: Tue, 19 Apr 2011 22:22:40 +0000 (-0700) Subject: Update docs for error messages. X-Git-Tag: 0.51~12^2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=300beb84352ea83e7d061082eb18b363569001db;p=awesomized%2Flibmemcached Update docs for error messages. --- diff --git a/docs/client_errors/MEMCACHED_AUTH_CONTINUE.rst b/docs/client_errors/MEMCACHED_AUTH_CONTINUE.rst new file mode 100644 index 00000000..8a3e6c77 --- /dev/null +++ b/docs/client_errors/MEMCACHED_AUTH_CONTINUE.rst @@ -0,0 +1,5 @@ +======================= +MEMCACHED_AUTH_CONTINUE +======================= + +Authentication has been paused. diff --git a/docs/client_errors/MEMCACHED_AUTH_FAILURE.rst b/docs/client_errors/MEMCACHED_AUTH_FAILURE.rst new file mode 100644 index 00000000..36d5a0c9 --- /dev/null +++ b/docs/client_errors/MEMCACHED_AUTH_FAILURE.rst @@ -0,0 +1,5 @@ +====================== +MEMCACHED_AUTH_FAILURE +====================== + +The credentials provided are not valid for this server. diff --git a/docs/client_errors/MEMCACHED_AUTH_PROBLEM.rst b/docs/client_errors/MEMCACHED_AUTH_PROBLEM.rst new file mode 100644 index 00000000..196d6f98 --- /dev/null +++ b/docs/client_errors/MEMCACHED_AUTH_PROBLEM.rst @@ -0,0 +1,5 @@ +====================== +MEMCACHED_AUTH_PROBLEM +====================== + +An unknown issue has occured during authentication. diff --git a/docs/client_errors/MEMCACHED_BAD_KEY_PROVIDED.rst b/docs/client_errors/MEMCACHED_BAD_KEY_PROVIDED.rst new file mode 100644 index 00000000..73aa4f14 --- /dev/null +++ b/docs/client_errors/MEMCACHED_BAD_KEY_PROVIDED.rst @@ -0,0 +1,5 @@ +========================== +MEMCACHED_BAD_KEY_PROVIDED +========================== + +The key provided is not a valid key. diff --git a/docs/client_errors/MEMCACHED_BUFFERED.rst b/docs/client_errors/MEMCACHED_BUFFERED.rst new file mode 100644 index 00000000..d93526ad --- /dev/null +++ b/docs/client_errors/MEMCACHED_BUFFERED.rst @@ -0,0 +1,5 @@ +================== +MEMCACHED_BUFFERED +================== + +The request has been buffered. diff --git a/docs/client_errors/MEMCACHED_CLIENT_ERROR.rst b/docs/client_errors/MEMCACHED_CLIENT_ERROR.rst new file mode 100644 index 00000000..1db8286f --- /dev/null +++ b/docs/client_errors/MEMCACHED_CLIENT_ERROR.rst @@ -0,0 +1,5 @@ +====================== +MEMCACHED_CLIENT_ERROR +====================== + +An unknown client error has occured internally. diff --git a/docs/client_errors/MEMCACHED_CONNECTION_BIND_FAILURE.rst b/docs/client_errors/MEMCACHED_CONNECTION_BIND_FAILURE.rst new file mode 100644 index 00000000..319701cf --- /dev/null +++ b/docs/client_errors/MEMCACHED_CONNECTION_BIND_FAILURE.rst @@ -0,0 +1,5 @@ +================================= +MEMCACHED_CONNECTION_BIND_FAILURE +================================= + +We were not able to bind() to the socket. diff --git a/docs/client_errors/MEMCACHED_CONNECTION_FAILURE.rst b/docs/client_errors/MEMCACHED_CONNECTION_FAILURE.rst new file mode 100644 index 00000000..f46fa179 --- /dev/null +++ b/docs/client_errors/MEMCACHED_CONNECTION_FAILURE.rst @@ -0,0 +1,5 @@ +============================ +MEMCACHED_CONNECTION_FAILURE +============================ + +A unknown error has occured while trying to connect to a server. diff --git a/docs/client_errors/MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE.rst b/docs/client_errors/MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE.rst new file mode 100644 index 00000000..4bf2337e --- /dev/null +++ b/docs/client_errors/MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE.rst @@ -0,0 +1,5 @@ +========================================== +MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE +========================================== + +An error has occurred while trying to connect to a server. It is likely that either the number of file descriptors need to be increased or you are out of memory. diff --git a/docs/client_errors/MEMCACHED_DATA_DOES_NOT_EXIST.rst b/docs/client_errors/MEMCACHED_DATA_DOES_NOT_EXIST.rst new file mode 100644 index 00000000..13d5646a --- /dev/null +++ b/docs/client_errors/MEMCACHED_DATA_DOES_NOT_EXIST.rst @@ -0,0 +1,5 @@ +============================= +MEMCACHED_DATA_DOES_NOT_EXIST +============================= + +The data requested with the key given was not found. diff --git a/docs/client_errors/MEMCACHED_DATA_EXISTS.rst b/docs/client_errors/MEMCACHED_DATA_EXISTS.rst new file mode 100644 index 00000000..db0de35d --- /dev/null +++ b/docs/client_errors/MEMCACHED_DATA_EXISTS.rst @@ -0,0 +1,5 @@ +===================== +MEMCACHED_DATA_EXISTS +===================== + +The data requested with the key given was not found. diff --git a/docs/client_errors/MEMCACHED_DELETED.rst b/docs/client_errors/MEMCACHED_DELETED.rst new file mode 100644 index 00000000..c1e2acfe --- /dev/null +++ b/docs/client_errors/MEMCACHED_DELETED.rst @@ -0,0 +1,5 @@ +================= +MEMCACHED_DELETED +================= + +The object requested by the key has been deleted. diff --git a/docs/client_errors/MEMCACHED_DEPRECATED.rst b/docs/client_errors/MEMCACHED_DEPRECATED.rst new file mode 100644 index 00000000..733b1c12 --- /dev/null +++ b/docs/client_errors/MEMCACHED_DEPRECATED.rst @@ -0,0 +1,5 @@ +==================== +MEMCACHED_DEPRECATED +==================== + +The method that was requested has been deprecated. diff --git a/docs/client_errors/MEMCACHED_E2BIG.rst b/docs/client_errors/MEMCACHED_E2BIG.rst new file mode 100644 index 00000000..16c7b9c6 --- /dev/null +++ b/docs/client_errors/MEMCACHED_E2BIG.rst @@ -0,0 +1,5 @@ +=============== +MEMCACHED_E2BIG +=============== + +Item is too large for the server to store. diff --git a/docs/client_errors/MEMCACHED_END.rst b/docs/client_errors/MEMCACHED_END.rst new file mode 100644 index 00000000..39ad8542 --- /dev/null +++ b/docs/client_errors/MEMCACHED_END.rst @@ -0,0 +1,5 @@ +============= +MEMCACHED_END +============= + +The server has completed returning all of the objects requested. diff --git a/docs/client_errors/MEMCACHED_ERRNO.rst b/docs/client_errors/MEMCACHED_ERRNO.rst new file mode 100644 index 00000000..343f37d4 --- /dev/null +++ b/docs/client_errors/MEMCACHED_ERRNO.rst @@ -0,0 +1,5 @@ +=============== +MEMCACHED_ERRNO +=============== + +An error has occurred in the driver which has set errno. diff --git a/docs/client_errors/MEMCACHED_FAILURE.rst b/docs/client_errors/MEMCACHED_FAILURE.rst new file mode 100644 index 00000000..66c75083 --- /dev/null +++ b/docs/client_errors/MEMCACHED_FAILURE.rst @@ -0,0 +1,5 @@ +================= +MEMCACHED_FAILURE +================= + +A unknown failure has occurred in the server. diff --git a/docs/client_errors/MEMCACHED_FAIL_UNIX_SOCKET.rst b/docs/client_errors/MEMCACHED_FAIL_UNIX_SOCKET.rst new file mode 100644 index 00000000..d0781711 --- /dev/null +++ b/docs/client_errors/MEMCACHED_FAIL_UNIX_SOCKET.rst @@ -0,0 +1,5 @@ +========================== +MEMCACHED_FAIL_UNIX_SOCKET +========================== + +A connection was not established with the server via a unix domain socket. diff --git a/docs/client_errors/MEMCACHED_FETCH_NOTFINISHED.rst b/docs/client_errors/MEMCACHED_FETCH_NOTFINISHED.rst new file mode 100644 index 00000000..7e90a5a9 --- /dev/null +++ b/docs/client_errors/MEMCACHED_FETCH_NOTFINISHED.rst @@ -0,0 +1,5 @@ +=========================== +MEMCACHED_FETCH_NOTFINISHED +=========================== + +A request has been made, but the server has not finished the fetch of the last request. diff --git a/docs/client_errors/MEMCACHED_HOST_LOOKUP_FAILURE.rst b/docs/client_errors/MEMCACHED_HOST_LOOKUP_FAILURE.rst new file mode 100644 index 00000000..cbfe70ff --- /dev/null +++ b/docs/client_errors/MEMCACHED_HOST_LOOKUP_FAILURE.rst @@ -0,0 +1,5 @@ +============================= +MEMCACHED_HOST_LOOKUP_FAILURE +============================= + +A DNS failure has occurred. diff --git a/docs/client_errors/MEMCACHED_INVALID_ARGUMENTS.rst b/docs/client_errors/MEMCACHED_INVALID_ARGUMENTS.rst new file mode 100644 index 00000000..0684dbf3 --- /dev/null +++ b/docs/client_errors/MEMCACHED_INVALID_ARGUMENTS.rst @@ -0,0 +1,5 @@ +=========================== +MEMCACHED_INVALID_ARGUMENTS +=========================== + +The arguments supplied to the given function were not valid. diff --git a/docs/client_errors/MEMCACHED_INVALID_HOST_PROTOCOL.rst b/docs/client_errors/MEMCACHED_INVALID_HOST_PROTOCOL.rst new file mode 100644 index 00000000..181a959e --- /dev/null +++ b/docs/client_errors/MEMCACHED_INVALID_HOST_PROTOCOL.rst @@ -0,0 +1,5 @@ +=============================== +MEMCACHED_INVALID_HOST_PROTOCOL +=============================== + +The server you are connecting too has an invalid protocol. Most likely you are connecting to an older server that does not speak the binary protocol. diff --git a/docs/client_errors/MEMCACHED_ITEM.rst b/docs/client_errors/MEMCACHED_ITEM.rst new file mode 100644 index 00000000..9f192037 --- /dev/null +++ b/docs/client_errors/MEMCACHED_ITEM.rst @@ -0,0 +1,5 @@ +============== +MEMCACHED_ITEM +============== + +An item has been fetched (this is an internal error only). diff --git a/docs/client_errors/MEMCACHED_KEY_TOO_BIG.rst b/docs/client_errors/MEMCACHED_KEY_TOO_BIG.rst new file mode 100644 index 00000000..cbb2eeb6 --- /dev/null +++ b/docs/client_errors/MEMCACHED_KEY_TOO_BIG.rst @@ -0,0 +1,5 @@ +===================== +MEMCACHED_KEY_TOO_BIG +===================== + +The key that has been provided is too large for the given server. diff --git a/docs/client_errors/MEMCACHED_MAXIMUM_RETURN.rst b/docs/client_errors/MEMCACHED_MAXIMUM_RETURN.rst new file mode 100644 index 00000000..d980e6d6 --- /dev/null +++ b/docs/client_errors/MEMCACHED_MAXIMUM_RETURN.rst @@ -0,0 +1,5 @@ +======================== +MEMCACHED_MAXIMUM_RETURN +======================== + +This in an internal only state. diff --git a/docs/client_errors/MEMCACHED_MEMORY_ALLOCATION_FAILURE.rst b/docs/client_errors/MEMCACHED_MEMORY_ALLOCATION_FAILURE.rst new file mode 100644 index 00000000..3a3472b5 --- /dev/null +++ b/docs/client_errors/MEMCACHED_MEMORY_ALLOCATION_FAILURE.rst @@ -0,0 +1,5 @@ +=================================== +MEMCACHED_MEMORY_ALLOCATION_FAILURE +=================================== + +An error has occurred while trying to allocate memory. diff --git a/docs/client_errors/MEMCACHED_NOTFOUND.rst b/docs/client_errors/MEMCACHED_NOTFOUND.rst new file mode 100644 index 00000000..c1a6ac16 --- /dev/null +++ b/docs/client_errors/MEMCACHED_NOTFOUND.rst @@ -0,0 +1,5 @@ +================== +MEMCACHED_NOTFOUND +================== + +The object requested was not found. diff --git a/docs/client_errors/MEMCACHED_NOTSTORED.rst b/docs/client_errors/MEMCACHED_NOTSTORED.rst new file mode 100644 index 00000000..61ea12b4 --- /dev/null +++ b/docs/client_errors/MEMCACHED_NOTSTORED.rst @@ -0,0 +1,5 @@ +=================== +MEMCACHED_NOTSTORED +=================== + +The request to store an object failed. diff --git a/docs/client_errors/MEMCACHED_NOT_SUPPORTED.rst b/docs/client_errors/MEMCACHED_NOT_SUPPORTED.rst new file mode 100644 index 00000000..f8befa0e --- /dev/null +++ b/docs/client_errors/MEMCACHED_NOT_SUPPORTED.rst @@ -0,0 +1,5 @@ +======================= +MEMCACHED_NOT_SUPPORTED +======================= + +The given method is not supported in the server. diff --git a/docs/client_errors/MEMCACHED_NO_KEY_PROVIDED.rst b/docs/client_errors/MEMCACHED_NO_KEY_PROVIDED.rst new file mode 100644 index 00000000..73cc54d5 --- /dev/null +++ b/docs/client_errors/MEMCACHED_NO_KEY_PROVIDED.rst @@ -0,0 +1,5 @@ +========================= +MEMCACHED_NO_KEY_PROVIDED +========================= + +No key was provided. diff --git a/docs/client_errors/MEMCACHED_NO_SERVERS.rst b/docs/client_errors/MEMCACHED_NO_SERVERS.rst new file mode 100644 index 00000000..5e61425b --- /dev/null +++ b/docs/client_errors/MEMCACHED_NO_SERVERS.rst @@ -0,0 +1,5 @@ +==================== +MEMCACHED_NO_SERVERS +==================== + +No servers have been added to the memcached_st object. diff --git a/docs/client_errors/MEMCACHED_PARSE_ERROR.rst b/docs/client_errors/MEMCACHED_PARSE_ERROR.rst new file mode 100644 index 00000000..a9c298e6 --- /dev/null +++ b/docs/client_errors/MEMCACHED_PARSE_ERROR.rst @@ -0,0 +1,5 @@ +===================== +MEMCACHED_PARSE_ERROR +===================== + +An error has occurred while trying to parse the configuration string. You should use memparse to determine what the error was. diff --git a/docs/client_errors/MEMCACHED_PARSE_USER_ERROR.rst b/docs/client_errors/MEMCACHED_PARSE_USER_ERROR.rst new file mode 100644 index 00000000..035e57ba --- /dev/null +++ b/docs/client_errors/MEMCACHED_PARSE_USER_ERROR.rst @@ -0,0 +1,5 @@ +========================== +MEMCACHED_PARSE_USER_ERROR +========================== + +An error has occurred in parsing the configuration string. diff --git a/docs/client_errors/MEMCACHED_PARTIAL_READ.rst b/docs/client_errors/MEMCACHED_PARTIAL_READ.rst new file mode 100644 index 00000000..7d389981 --- /dev/null +++ b/docs/client_errors/MEMCACHED_PARTIAL_READ.rst @@ -0,0 +1,5 @@ +====================== +MEMCACHED_PARTIAL_READ +====================== + +The read was only partcially successful. diff --git a/docs/client_errors/MEMCACHED_PROTOCOL_ERROR.rst b/docs/client_errors/MEMCACHED_PROTOCOL_ERROR.rst new file mode 100644 index 00000000..add6e902 --- /dev/null +++ b/docs/client_errors/MEMCACHED_PROTOCOL_ERROR.rst @@ -0,0 +1,5 @@ +======================== +MEMCACHED_PROTOCOL_ERROR +======================== + +An unknown error has occurred in the protocol. diff --git a/docs/client_errors/MEMCACHED_READ_FAILURE.rst b/docs/client_errors/MEMCACHED_READ_FAILURE.rst new file mode 100644 index 00000000..0da58b51 --- /dev/null +++ b/docs/client_errors/MEMCACHED_READ_FAILURE.rst @@ -0,0 +1,5 @@ +====================== +MEMCACHED_READ_FAILURE +====================== + +A read failure has occurred. diff --git a/docs/client_errors/MEMCACHED_SERVER_ERROR.rst b/docs/client_errors/MEMCACHED_SERVER_ERROR.rst new file mode 100644 index 00000000..78036443 --- /dev/null +++ b/docs/client_errors/MEMCACHED_SERVER_ERROR.rst @@ -0,0 +1,5 @@ +====================== +MEMCACHED_SERVER_ERROR +====================== + +An unknown error has occurred in the server. diff --git a/docs/client_errors/MEMCACHED_SERVER_MARKED_DEAD.rst b/docs/client_errors/MEMCACHED_SERVER_MARKED_DEAD.rst new file mode 100644 index 00000000..25c21ef9 --- /dev/null +++ b/docs/client_errors/MEMCACHED_SERVER_MARKED_DEAD.rst @@ -0,0 +1,5 @@ +============================ +MEMCACHED_SERVER_MARKED_DEAD +============================ + +The requested server has been marked dead. diff --git a/docs/client_errors/MEMCACHED_SOME_ERRORS.rst b/docs/client_errors/MEMCACHED_SOME_ERRORS.rst new file mode 100644 index 00000000..6666c3d1 --- /dev/null +++ b/docs/client_errors/MEMCACHED_SOME_ERRORS.rst @@ -0,0 +1,5 @@ +===================== +MEMCACHED_SOME_ERRORS +===================== + +A multi request has been made, and some underterminate number of errors have occurred. diff --git a/docs/client_errors/MEMCACHED_STAT.rst b/docs/client_errors/MEMCACHED_STAT.rst new file mode 100644 index 00000000..39f8109c --- /dev/null +++ b/docs/client_errors/MEMCACHED_STAT.rst @@ -0,0 +1,5 @@ +============== +MEMCACHED_STAT +============== + +A "stat" command has been returned in the protocol. diff --git a/docs/client_errors/MEMCACHED_STORED.rst b/docs/client_errors/MEMCACHED_STORED.rst new file mode 100644 index 00000000..daebc625 --- /dev/null +++ b/docs/client_errors/MEMCACHED_STORED.rst @@ -0,0 +1,5 @@ +================ +MEMCACHED_STORED +================ + +The requested object has been successfully stored on the server. diff --git a/docs/client_errors/MEMCACHED_SUCCESS.rst b/docs/client_errors/MEMCACHED_SUCCESS.rst new file mode 100644 index 00000000..f4e398c2 --- /dev/null +++ b/docs/client_errors/MEMCACHED_SUCCESS.rst @@ -0,0 +1,5 @@ +================= +MEMCACHED_SUCCESS +================= + +The request was successfully executed. diff --git a/docs/client_errors/MEMCACHED_TIMEOUT.rst b/docs/client_errors/MEMCACHED_TIMEOUT.rst new file mode 100644 index 00000000..27479a7f --- /dev/null +++ b/docs/client_errors/MEMCACHED_TIMEOUT.rst @@ -0,0 +1,5 @@ +================= +MEMCACHED_TIMEOUT +================= + +Operation has timed out. diff --git a/docs/client_errors/MEMCACHED_UNKNOWN_READ_FAILURE.rst b/docs/client_errors/MEMCACHED_UNKNOWN_READ_FAILURE.rst new file mode 100644 index 00000000..2056c4d6 --- /dev/null +++ b/docs/client_errors/MEMCACHED_UNKNOWN_READ_FAILURE.rst @@ -0,0 +1,5 @@ +============================== +MEMCACHED_UNKNOWN_READ_FAILURE +============================== + +An unknown read failure only occurs when either there is a bug in the server, or in rare cases where an ethernet nic is reporting dubious information. diff --git a/docs/client_errors/MEMCACHED_UNKNOWN_STAT_KEY.rst b/docs/client_errors/MEMCACHED_UNKNOWN_STAT_KEY.rst new file mode 100644 index 00000000..0fe362e0 --- /dev/null +++ b/docs/client_errors/MEMCACHED_UNKNOWN_STAT_KEY.rst @@ -0,0 +1,5 @@ +========================== +MEMCACHED_UNKNOWN_STAT_KEY +========================== + +The server you are communicating with has a stat key which has not be defined in the protocol. diff --git a/docs/client_errors/MEMCACHED_VALUE.rst b/docs/client_errors/MEMCACHED_VALUE.rst new file mode 100644 index 00000000..3eae4a18 --- /dev/null +++ b/docs/client_errors/MEMCACHED_VALUE.rst @@ -0,0 +1,5 @@ +=============== +MEMCACHED_VALUE +=============== + +A value has been returned from the server (this is an internal condition only). diff --git a/docs/client_errors/MEMCACHED_WRITE_FAILURE.rst b/docs/client_errors/MEMCACHED_WRITE_FAILURE.rst new file mode 100644 index 00000000..72388ff9 --- /dev/null +++ b/docs/client_errors/MEMCACHED_WRITE_FAILURE.rst @@ -0,0 +1,5 @@ +======================= +MEMCACHED_WRITE_FAILURE +======================= + +An error has occured while trying to write to a server. diff --git a/docs/error_messages.rst b/docs/error_messages.rst new file mode 100644 index 00000000..34cc3045 --- /dev/null +++ b/docs/error_messages.rst @@ -0,0 +1,55 @@ +===================== +Client Error messages +===================== + +.. toctree:: + :maxdepth: 1 + + client_errors/MEMCACHED_AUTH_CONTINUE + client_errors/MEMCACHED_AUTH_FAILURE + client_errors/MEMCACHED_AUTH_PROBLEM + client_errors/MEMCACHED_BAD_KEY_PROVIDED + client_errors/MEMCACHED_BUFFERED + client_errors/MEMCACHED_CLIENT_ERROR + client_errors/MEMCACHED_CONNECTION_BIND_FAILURE + client_errors/MEMCACHED_CONNECTION_FAILURE + client_errors/MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE + client_errors/MEMCACHED_DATA_DOES_NOT_EXIST + client_errors/MEMCACHED_DATA_EXISTS + client_errors/MEMCACHED_DELETED + client_errors/MEMCACHED_DEPRECATED + client_errors/MEMCACHED_E2BIG + client_errors/MEMCACHED_END + client_errors/MEMCACHED_ERRNO + client_errors/MEMCACHED_FAILURE + client_errors/MEMCACHED_FAIL_UNIX_SOCKET + client_errors/MEMCACHED_FETCH_NOTFINISHED + client_errors/MEMCACHED_HOST_LOOKUP_FAILURE + client_errors/MEMCACHED_INVALID_ARGUMENTS + client_errors/MEMCACHED_INVALID_HOST_PROTOCOL + client_errors/MEMCACHED_ITEM + client_errors/MEMCACHED_KEY_TOO_BIG + client_errors/MEMCACHED_MAXIMUM_RETURN + client_errors/MEMCACHED_MEMORY_ALLOCATION_FAILURE + client_errors/MEMCACHED_NOTFOUND + client_errors/MEMCACHED_NOTSTORED + client_errors/MEMCACHED_NOT_SUPPORTED + client_errors/MEMCACHED_NO_KEY_PROVIDED + client_errors/MEMCACHED_NO_SERVERS + client_errors/MEMCACHED_PARSE_ERROR + client_errors/MEMCACHED_PARSE_USER_ERROR + client_errors/MEMCACHED_PARTIAL_READ + client_errors/MEMCACHED_PROTOCOL_ERROR + client_errors/MEMCACHED_READ_FAILURE + client_errors/MEMCACHED_SERVER_ERROR + client_errors/MEMCACHED_SERVER_MARKED_DEAD + client_errors/MEMCACHED_SOME_ERRORS + client_errors/MEMCACHED_STAT + client_errors/MEMCACHED_STORED + client_errors/MEMCACHED_SUCCESS + client_errors/MEMCACHED_TIMEOUT + client_errors/MEMCACHED_UNKNOWN_READ_FAILURE + client_errors/MEMCACHED_UNKNOWN_STAT_KEY + client_errors/MEMCACHED_VALUE + client_errors/MEMCACHED_WRITE_FAILURE + diff --git a/docs/include.am b/docs/include.am index 12ebed36..5cd682b7 100644 --- a/docs/include.am +++ b/docs/include.am @@ -4,6 +4,54 @@ EXTRA_DIST+= \ docs/conf.py \ + docs/error_messages.rst \ + docs/client_errors/MEMCACHED_AUTH_CONTINUE.rst \ + docs/client_errors/MEMCACHED_AUTH_FAILURE.rst \ + docs/client_errors/MEMCACHED_AUTH_PROBLEM.rst \ + docs/client_errors/MEMCACHED_BAD_KEY_PROVIDED.rst \ + docs/client_errors/MEMCACHED_BUFFERED.rst \ + docs/client_errors/MEMCACHED_CLIENT_ERROR.rst \ + docs/client_errors/MEMCACHED_CONNECTION_BIND_FAILURE.rst \ + docs/client_errors/MEMCACHED_CONNECTION_FAILURE.rst \ + docs/client_errors/MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE.rst \ + docs/client_errors/MEMCACHED_DATA_DOES_NOT_EXIST.rst \ + docs/client_errors/MEMCACHED_DATA_EXISTS.rst \ + docs/client_errors/MEMCACHED_DELETED.rst \ + docs/client_errors/MEMCACHED_DEPRECATED.rst \ + docs/client_errors/MEMCACHED_E2BIG.rst \ + docs/client_errors/MEMCACHED_END.rst \ + docs/client_errors/MEMCACHED_ERRNO.rst \ + docs/client_errors/MEMCACHED_FAILURE.rst \ + docs/client_errors/MEMCACHED_FAIL_UNIX_SOCKET.rst \ + docs/client_errors/MEMCACHED_FETCH_NOTFINISHED.rst \ + docs/client_errors/MEMCACHED_HOST_LOOKUP_FAILURE.rst \ + docs/client_errors/MEMCACHED_INVALID_ARGUMENTS.rst \ + docs/client_errors/MEMCACHED_INVALID_HOST_PROTOCOL.rst \ + docs/client_errors/MEMCACHED_ITEM.rst \ + docs/client_errors/MEMCACHED_KEY_TOO_BIG.rst \ + docs/client_errors/MEMCACHED_MAXIMUM_RETURN.rst \ + docs/client_errors/MEMCACHED_MEMORY_ALLOCATION_FAILURE.rst \ + docs/client_errors/MEMCACHED_NOTFOUND.rst \ + docs/client_errors/MEMCACHED_NOTSTORED.rst \ + docs/client_errors/MEMCACHED_NOT_SUPPORTED.rst \ + docs/client_errors/MEMCACHED_NO_KEY_PROVIDED.rst \ + docs/client_errors/MEMCACHED_NO_SERVERS.rst \ + docs/client_errors/MEMCACHED_PARSE_ERROR.rst \ + docs/client_errors/MEMCACHED_PARSE_USER_ERROR.rst \ + docs/client_errors/MEMCACHED_PARTIAL_READ.rst \ + docs/client_errors/MEMCACHED_PROTOCOL_ERROR.rst \ + docs/client_errors/MEMCACHED_READ_FAILURE.rst \ + docs/client_errors/MEMCACHED_SERVER_ERROR.rst \ + docs/client_errors/MEMCACHED_SERVER_MARKED_DEAD.rst \ + docs/client_errors/MEMCACHED_SOME_ERRORS.rst \ + docs/client_errors/MEMCACHED_STAT.rst \ + docs/client_errors/MEMCACHED_STORED.rst \ + docs/client_errors/MEMCACHED_SUCCESS.rst \ + docs/client_errors/MEMCACHED_TIMEOUT.rst \ + docs/client_errors/MEMCACHED_UNKNOWN_READ_FAILURE.rst \ + docs/client_errors/MEMCACHED_UNKNOWN_STAT_KEY.rst \ + docs/client_errors/MEMCACHED_VALUE.rst \ + docs/client_errors/MEMCACHED_WRITE_FAILURE.rst \ docs/hashkit_create.rst \ docs/hashkit_functions.rst \ docs/hashkit_value.rst \ diff --git a/docs/index.rst b/docs/index.rst index 79ce45e2..d9d3e033 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,6 +19,7 @@ Basics memcached_create libmemcached_examples libmemcached_configuration + error_messages ################# diff --git a/libmemcached/constants.h b/libmemcached/constants.h index b4a87257..3fe44739 100644 --- a/libmemcached/constants.h +++ b/libmemcached/constants.h @@ -30,61 +30,6 @@ #define MEMCACHED_VERSION_STRING_LENGTH 24 -enum memcached_return_t { - MEMCACHED_SUCCESS, - MEMCACHED_FAILURE, - MEMCACHED_HOST_LOOKUP_FAILURE, - MEMCACHED_CONNECTION_FAILURE, - MEMCACHED_CONNECTION_BIND_FAILURE, - MEMCACHED_WRITE_FAILURE, - MEMCACHED_READ_FAILURE, - MEMCACHED_UNKNOWN_READ_FAILURE, - MEMCACHED_PROTOCOL_ERROR, - MEMCACHED_CLIENT_ERROR, - MEMCACHED_SERVER_ERROR, - MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE, - MEMCACHED_DATA_EXISTS, - MEMCACHED_DATA_DOES_NOT_EXIST, - MEMCACHED_NOTSTORED, - MEMCACHED_STORED, - MEMCACHED_NOTFOUND, - MEMCACHED_MEMORY_ALLOCATION_FAILURE, - MEMCACHED_PARTIAL_READ, - MEMCACHED_SOME_ERRORS, - MEMCACHED_NO_SERVERS, - MEMCACHED_END, - MEMCACHED_DELETED, - MEMCACHED_VALUE, - MEMCACHED_STAT, - MEMCACHED_ITEM, - MEMCACHED_ERRNO, - MEMCACHED_FAIL_UNIX_SOCKET, - MEMCACHED_NOT_SUPPORTED, - MEMCACHED_NO_KEY_PROVIDED, /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED! */ - MEMCACHED_FETCH_NOTFINISHED, - MEMCACHED_TIMEOUT, - MEMCACHED_BUFFERED, - MEMCACHED_BAD_KEY_PROVIDED, - MEMCACHED_INVALID_HOST_PROTOCOL, - MEMCACHED_SERVER_MARKED_DEAD, - MEMCACHED_UNKNOWN_STAT_KEY, - MEMCACHED_E2BIG, - MEMCACHED_INVALID_ARGUMENTS, - MEMCACHED_KEY_TOO_BIG, - MEMCACHED_AUTH_PROBLEM, - MEMCACHED_AUTH_FAILURE, - MEMCACHED_AUTH_CONTINUE, - MEMCACHED_PARSE_ERROR, - MEMCACHED_PARSE_USER_ERROR, - MEMCACHED_DEPRECATED, - MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */ -}; - -#ifndef __cplusplus -typedef enum memcached_return_t memcached_return_t; -#endif - - enum memcached_server_distribution_t { MEMCACHED_DISTRIBUTION_MODULA, MEMCACHED_DISTRIBUTION_CONSISTENT, diff --git a/libmemcached/include.am b/libmemcached/include.am index 496b7a9b..f243f12f 100644 --- a/libmemcached/include.am +++ b/libmemcached/include.am @@ -55,6 +55,7 @@ nobase_include_HEADERS+= \ libmemcached/protocol/callback.h \ libmemcached/protocol_handler.h \ libmemcached/quit.h \ + libmemcached/return.h \ libmemcached/platform.h \ libmemcached/result.h \ libmemcached/sasl.h \ diff --git a/libmemcached/memcached.h b/libmemcached/memcached.h index 83072e9a..1baab961 100644 --- a/libmemcached/memcached.h +++ b/libmemcached/memcached.h @@ -35,8 +35,7 @@ * */ -#ifndef __LIBMEMCACHED_MEMCACHED_H__ -#define __LIBMEMCACHED_MEMCACHED_H__ +#pragma once #include #include @@ -51,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -213,6 +213,3 @@ uint32_t memcached_server_count(const memcached_st *); #ifdef __cplusplus } // extern "C" #endif - -#endif /* __LIBMEMCACHED_MEMCACHED_H__ */ - diff --git a/libmemcached/return.h b/libmemcached/return.h new file mode 100644 index 00000000..c7aa6003 --- /dev/null +++ b/libmemcached/return.h @@ -0,0 +1,93 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +enum memcached_return_t { + MEMCACHED_SUCCESS, + MEMCACHED_FAILURE, + MEMCACHED_HOST_LOOKUP_FAILURE, + MEMCACHED_CONNECTION_FAILURE, + MEMCACHED_CONNECTION_BIND_FAILURE, + MEMCACHED_WRITE_FAILURE, + MEMCACHED_READ_FAILURE, + MEMCACHED_UNKNOWN_READ_FAILURE, + MEMCACHED_PROTOCOL_ERROR, + MEMCACHED_CLIENT_ERROR, + MEMCACHED_SERVER_ERROR, + MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE, + MEMCACHED_DATA_EXISTS, + MEMCACHED_DATA_DOES_NOT_EXIST, + MEMCACHED_NOTSTORED, + MEMCACHED_STORED, + MEMCACHED_NOTFOUND, + MEMCACHED_MEMORY_ALLOCATION_FAILURE, + MEMCACHED_PARTIAL_READ, + MEMCACHED_SOME_ERRORS, + MEMCACHED_NO_SERVERS, + MEMCACHED_END, + MEMCACHED_DELETED, + MEMCACHED_VALUE, + MEMCACHED_STAT, + MEMCACHED_ITEM, + MEMCACHED_ERRNO, + MEMCACHED_FAIL_UNIX_SOCKET, + MEMCACHED_NOT_SUPPORTED, + MEMCACHED_NO_KEY_PROVIDED, /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED! */ + MEMCACHED_FETCH_NOTFINISHED, + MEMCACHED_TIMEOUT, + MEMCACHED_BUFFERED, + MEMCACHED_BAD_KEY_PROVIDED, + MEMCACHED_INVALID_HOST_PROTOCOL, + MEMCACHED_SERVER_MARKED_DEAD, + MEMCACHED_UNKNOWN_STAT_KEY, + MEMCACHED_E2BIG, + MEMCACHED_INVALID_ARGUMENTS, + MEMCACHED_KEY_TOO_BIG, + MEMCACHED_AUTH_PROBLEM, + MEMCACHED_AUTH_FAILURE, + MEMCACHED_AUTH_CONTINUE, + MEMCACHED_PARSE_ERROR, + MEMCACHED_PARSE_USER_ERROR, + MEMCACHED_DEPRECATED, + MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */ +}; + +#ifndef __cplusplus +typedef enum memcached_return_t memcached_return_t; +#endif + +