Add the command name in the unknown command error message.

This commit is contained in:
antirez 2009-12-23 06:23:32 -05:00
parent 752da584f0
commit 2c14807b2d

View File

@ -1714,7 +1714,9 @@ static int processCommand(redisClient *c) {
}
cmd = lookupCommand(c->argv[0]->ptr);
if (!cmd) {
addReplySds(c,sdsnew("-ERR unknown command\r\n"));
addReplySds(c,
sdscatprintf(sdsempty(), "-ERR unknown command '%s'\r\n",
(char*)c->argv[0]->ptr));
resetClient(c);
return 1;
} else if ((cmd->arity > 0 && cmd->arity != c->argc) ||