Update to error messages.
[awesomized/libmemcached] / libmemcached / auto.cc
index 88b921c4cdf889083dd19aaaf9b804d3a3bf57b8..28550a18c1e73940a36523122fde7d416d002770 100644 (file)
@@ -315,7 +315,8 @@ memcached_return_t memcached_increment_with_initial_by_key(memcached_st *ptr,
   }
   else
   {
-    rc= MEMCACHED_PROTOCOL_ERROR;
+    rc=  memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT,
+                             memcached_literal_param("memcached_increment_with_initial_by_key() is not supported via the ASCII protocol"));
   }
 
   LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();
@@ -380,7 +381,8 @@ memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *ptr,
   }
   else
   {
-    rc= MEMCACHED_PROTOCOL_ERROR;
+    rc=  memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT,
+                             memcached_literal_param("memcached_decrement_with_initial_by_key() is not supported via the ASCII protocol"));
   }
 
   LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();