Updating for 1.0.2 release
[awesomized/libmemcached] / libhashkit / strerror.cc
1 /* HashKit
2 * Copyright (C) 2009 Brian Aker
3 * All rights reserved.
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
7 */
8
9 #include <libhashkit/common.h>
10
11 const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc)
12 {
13 (void)ptr;
14 switch (rc)
15 {
16 case HASHKIT_SUCCESS: return "SUCCESS";
17 case HASHKIT_FAILURE: return "FAILURE";
18 case HASHKIT_MEMORY_ALLOCATION_FAILURE: return "MEMORY ALLOCATION FAILURE";
19 case HASHKIT_INVALID_ARGUMENT: return "INVALID ARGUMENT";
20 case HASHKIT_INVALID_HASH: return "INVALID hashkit_hash_algorithm_t";
21 case HASHKIT_MAXIMUM_RETURN:
22 default:
23 return "INVALID hashkit_return_t";
24 }
25 }