Commit 2263fde4 authored by Yuqi Zhang's avatar Yuqi Zhang
Browse files

error message for exec

parent 878b43a2
......@@ -86,7 +86,7 @@ public:
rb = true;
read_thread = thread([this, &rb] {
redis_client c1(IP_SERVER, BASE_PORT);
redis_client c2(IP_SERVER, BASE_PORT);
redis_client c2(IP_SERVER, BASE_PORT + 1);
auto start_time = chrono::steady_clock::now();
int i = 0;
while (rb)
......
......@@ -95,8 +95,8 @@ public:
auto r = static_cast<redisReply *>(redisCommand(c, cmd.c_str()));
if (r == nullptr)
{
cout << "\nhost " << c->tcp.host << ":" << c->tcp.port << " terminated.\n"
<< "executing " << cmd << endl;
cout << "\nerror for host " << c->tcp.host << ":" << c->tcp.port << " to execute "
<< cmd << ",\nerror code: " << c->err << ", error message: " << c->errstr << endl;
exit(-1);
}
return redisReply_ptr(r, freeReplyObject);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment