You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I like the C++ style, the features of the project. However I could not make the simplest code work on my machine (centos 7).
The call set() throw an exception:
A null status reply
Could you please help?
Thanks
---Patrick
int main()
{
try {
// Create an Redis object, which is movable but NOT copyable.
auto redis = Redis("tcp://127.0.0.1:6379");
// ***** STRING commands *****
redis.set("key", "val"); //exception is thrown here
std::cout << "Redis set key\n";
auto val = redis.get("key"); // val is of type OptionalString. See 'API Reference' section for details.
if (val) {
// Dereference val to get the returned value of std::string type.
std::cout << *val << std::endl;
} // else key doesn't exist.
else
{
std::cerr << "Key key does not exist\n";
}
Hi, I like the C++ style, the features of the project. However I could not make the simplest code work on my machine (centos 7).
The call set() throw an exception:
A null status reply
Could you please help?
Thanks
---Patrick
int main()
{
try {
// Create an Redis object, which is movable but NOT copyable.
auto redis = Redis("tcp://127.0.0.1:6379");
} catch (const Error &e) {
// Error handling.
std::cerr << e.what() << "\n";
}
}
The text was updated successfully, but these errors were encountered: