projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Document/standardize the return types from the fetch methods.
[awesomized/libmemcached]
/
libmemcached
/
error.cc
diff --git
a/libmemcached/error.cc
b/libmemcached/error.cc
index 16608ff9eeb8b473cc9581e539c9fc553c6bae24..49375097db884b9555e34d6836c4fafc2a3cd296 100644
(file)
--- a/
libmemcached/error.cc
+++ b/
libmemcached/error.cc
@@
-61,7
+61,6
@@
static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t
// For memory allocation we use our error since it is a bit more specific
if (local_errno == ENOMEM and rc == MEMCACHED_ERRNO)
{
// For memory allocation we use our error since it is a bit more specific
if (local_errno == ENOMEM and rc == MEMCACHED_ERRNO)
{
- local_errno= ENOMEM;
rc= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
}
rc= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
}
@@
-81,6
+80,16
@@
static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t
rc= MEMCACHED_CONNECTION_FAILURE;
}
rc= MEMCACHED_CONNECTION_FAILURE;
}
+ if (local_errno == EINVAL)
+ {
+ rc= MEMCACHED_INVALID_ARGUMENTS;
+ }
+
+ if (local_errno == ECONNREFUSED)
+ {
+ rc= MEMCACHED_CONNECTION_FAILURE;
+ }
+
memcached_error_t *error= (struct memcached_error_t *)libmemcached_malloc(&memc, sizeof(struct memcached_error_t));
if (not error) // Bad business if this happens
return;
memcached_error_t *error= (struct memcached_error_t *)libmemcached_malloc(&memc, sizeof(struct memcached_error_t));
if (not error) // Bad business if this happens
return;