Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
m6w6 opened this issue Jan 20, 2020 · 0 comments
Open

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

m6w6 opened this issue Jan 20, 2020 · 0 comments
Labels

Comments

@m6w6
Copy link
Collaborator

m6w6 commented Jan 20, 2020

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!
	}
@m6w6 m6w6 added New cpp and removed New labels Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant