Skip to content

memcached::Memcached C++ wrapper doesn't give error codes #22

@m6w6

Description

@m6w6

Imported from Launchpad using lp2gh.


The class memcached::Memcached seemed to be great as I am a C++ developer. However, the return types of methods like get or mget are annoying:
Sometimes (for a MEMCACHED_NOTFOUND or a MEMCACHED_DATA_EXISTS for example), the function returns false, but when I get the error codes, it returns MEMCACHED_SUCCESS!

example code:

	std::string key = "key";
	std::vector<char> readData;
	if(!m_memcached->get(key, readData))
	{
		memcached_return_t result = MEMCACHED_SUCCESS;
		m_memcached->error(result);//result can be MEMCACHED_SUCCESS here!
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions