Update docs for error messages.
authorBrian Aker <brian@tangent.org>
Tue, 19 Apr 2011 22:22:40 +0000 (15:22 -0700)
committerBrian Aker <brian@tangent.org>
Tue, 19 Apr 2011 22:22:40 +0000 (15:22 -0700)
54 files changed:
docs/client_errors/MEMCACHED_AUTH_CONTINUE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_AUTH_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_AUTH_PROBLEM.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_BAD_KEY_PROVIDED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_BUFFERED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_CLIENT_ERROR.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_CONNECTION_BIND_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_CONNECTION_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_DATA_DOES_NOT_EXIST.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_DATA_EXISTS.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_DELETED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_DEPRECATED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_E2BIG.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_END.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_ERRNO.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_FAIL_UNIX_SOCKET.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_FETCH_NOTFINISHED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_HOST_LOOKUP_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_INVALID_ARGUMENTS.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_INVALID_HOST_PROTOCOL.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_ITEM.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_KEY_TOO_BIG.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_MAXIMUM_RETURN.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_MEMORY_ALLOCATION_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_NOTFOUND.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_NOTSTORED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_NOT_SUPPORTED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_NO_KEY_PROVIDED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_NO_SERVERS.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_PARSE_ERROR.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_PARSE_USER_ERROR.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_PARTIAL_READ.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_PROTOCOL_ERROR.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_READ_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_SERVER_ERROR.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_SERVER_MARKED_DEAD.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_SOME_ERRORS.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_STAT.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_STORED.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_SUCCESS.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_TIMEOUT.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_UNKNOWN_READ_FAILURE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_UNKNOWN_STAT_KEY.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_VALUE.rst [new file with mode: 0644]
docs/client_errors/MEMCACHED_WRITE_FAILURE.rst [new file with mode: 0644]
docs/error_messages.rst [new file with mode: 0644]
docs/include.am
docs/index.rst
libmemcached/constants.h
libmemcached/include.am
libmemcached/memcached.h
libmemcached/return.h [new file with mode: 0644]

diff --git a/docs/client_errors/MEMCACHED_AUTH_CONTINUE.rst b/docs/client_errors/MEMCACHED_AUTH_CONTINUE.rst
new file mode 100644 (file)
index 0000000..8a3e6c7
--- /dev/null
@@ -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 (file)
index 0000000..36d5a0c
--- /dev/null
@@ -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 (file)
index 0000000..196d6f9
--- /dev/null
@@ -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 (file)
index 0000000..73aa4f1
--- /dev/null
@@ -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 (file)
index 0000000..d93526a
--- /dev/null
@@ -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 (file)
index 0000000..1db8286
--- /dev/null
@@ -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 (file)
index 0000000..319701c
--- /dev/null
@@ -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 (file)
index 0000000..f46fa17
--- /dev/null
@@ -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 (file)
index 0000000..4bf2337
--- /dev/null
@@ -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 (file)
index 0000000..13d5646
--- /dev/null
@@ -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 (file)
index 0000000..db0de35
--- /dev/null
@@ -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 (file)
index 0000000..c1e2acf
--- /dev/null
@@ -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 (file)
index 0000000..733b1c1
--- /dev/null
@@ -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 (file)
index 0000000..16c7b9c
--- /dev/null
@@ -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 (file)
index 0000000..39ad854
--- /dev/null
@@ -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 (file)
index 0000000..343f37d
--- /dev/null
@@ -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 (file)
index 0000000..66c7508
--- /dev/null
@@ -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 (file)
index 0000000..d078171
--- /dev/null
@@ -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 (file)
index 0000000..7e90a5a
--- /dev/null
@@ -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 (file)
index 0000000..cbfe70f
--- /dev/null
@@ -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 (file)
index 0000000..0684dbf
--- /dev/null
@@ -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 (file)
index 0000000..181a959
--- /dev/null
@@ -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 (file)
index 0000000..9f19203
--- /dev/null
@@ -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 (file)
index 0000000..cbb2eeb
--- /dev/null
@@ -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 (file)
index 0000000..d980e6d
--- /dev/null
@@ -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 (file)
index 0000000..3a3472b
--- /dev/null
@@ -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 (file)
index 0000000..c1a6ac1
--- /dev/null
@@ -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 (file)
index 0000000..61ea12b
--- /dev/null
@@ -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 (file)
index 0000000..f8befa0
--- /dev/null
@@ -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 (file)
index 0000000..73cc54d
--- /dev/null
@@ -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 (file)
index 0000000..5e61425
--- /dev/null
@@ -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 (file)
index 0000000..a9c298e
--- /dev/null
@@ -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 (file)
index 0000000..035e57b
--- /dev/null
@@ -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 (file)
index 0000000..7d38998
--- /dev/null
@@ -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 (file)
index 0000000..add6e90
--- /dev/null
@@ -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 (file)
index 0000000..0da58b5
--- /dev/null
@@ -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 (file)
index 0000000..7803644
--- /dev/null
@@ -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 (file)
index 0000000..25c21ef
--- /dev/null
@@ -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 (file)
index 0000000..6666c3d
--- /dev/null
@@ -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 (file)
index 0000000..39f8109
--- /dev/null
@@ -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 (file)
index 0000000..daebc62
--- /dev/null
@@ -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 (file)
index 0000000..f4e398c
--- /dev/null
@@ -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 (file)
index 0000000..27479a7
--- /dev/null
@@ -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 (file)
index 0000000..2056c4d
--- /dev/null
@@ -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 (file)
index 0000000..0fe362e
--- /dev/null
@@ -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 (file)
index 0000000..3eae4a1
--- /dev/null
@@ -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 (file)
index 0000000..72388ff
--- /dev/null
@@ -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 (file)
index 0000000..34cc304
--- /dev/null
@@ -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
+   
index 12ebed36ce42fac7cfba4b29b76912f38940db0a..5cd682b71d6bbf3fa3f5d4f806c166a248bc252c 100644 (file)
@@ -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 \
index 79ce45e259bfc099c00bb58169ce9a331b9f5157..d9d3e033008a527e700490e3e2743dfe9bf7f2e5 100644 (file)
@@ -19,6 +19,7 @@ Basics
    memcached_create
    libmemcached_examples
    libmemcached_configuration
+   error_messages
 
 
 #################
index b4a87257957ba366e8ae188e2189e1118ec0d9f7..3fe44739de7e2b1bdda083d5a0086d076e1b4ba7 100644 (file)
 #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,
index 496b7a9b2da8929067f8257a8a53fd0b7e4cb16a..f243f12fc844ebb9f340f25d6626d26ab40cf2f6 100644 (file)
@@ -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 \
index 83072e9ae1e97dc95256b196c7f8435f0dd49558..1baab961bbf7b9b348c3cb1cad386f899104ea5d 100644 (file)
@@ -35,8 +35,7 @@
  *
  */
 
-#ifndef __LIBMEMCACHED_MEMCACHED_H__
-#define __LIBMEMCACHED_MEMCACHED_H__
+#pragma once
 
 #include <inttypes.h>
 #include <stdlib.h>
@@ -51,6 +50,7 @@
 #include <libmemcached/configure.h>
 #include <libmemcached/platform.h>
 #include <libmemcached/constants.h>
+#include <libmemcached/return.h>
 #include <libmemcached/types.h>
 #include <libmemcached/string.h>
 #include <libmemcached/array.h>
@@ -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 (file)
index 0000000..c7aa600
--- /dev/null
@@ -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
+
+