Commit c199280e authored by Itamar Haber's avatar Itamar Haber
Browse files

Globally applies addReplySubSyntaxError

parent 76ad23d0
...@@ -4746,8 +4746,7 @@ NULL ...@@ -4746,8 +4746,7 @@ NULL
clusterReset(hard); clusterReset(hard);
addReply(c,shared.ok); addReply(c,shared.ok);
} else { } else {
addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try CLUSTER HELP", addReplySubSyntaxError(c);
(char*)c->argv[1]->ptr);
return; return;
} }
} }
......
...@@ -2149,8 +2149,7 @@ NULL ...@@ -2149,8 +2149,7 @@ NULL
addReply(c,shared.ok); addReply(c,shared.ok);
} }
} else { } else {
addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try CONFIG HELP", addReplySubSyntaxError(c);
(char*)c->argv[1]->ptr);
return; return;
} }
} }
...@@ -553,8 +553,7 @@ NULL ...@@ -553,8 +553,7 @@ NULL
clearReplicationId2(); clearReplicationId2();
addReply(c,shared.ok); addReply(c,shared.ok);
} else { } else {
addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try DEBUG HELP", addReplySubSyntaxError(c);
(char*)c->argv[1]->ptr);
return; return;
} }
} }
......
...@@ -1197,7 +1197,7 @@ NULL ...@@ -1197,7 +1197,7 @@ NULL
* when the key is read or overwritten. */ * when the key is read or overwritten. */
addReplyLongLong(c,LFUDecrAndReturn(o)); addReplyLongLong(c,LFUDecrAndReturn(o));
} else { } else {
addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try OBJECT help", (char *)c->argv[1]->ptr); addReplySubSyntaxError(c);
} }
} }
......
...@@ -372,7 +372,6 @@ NULL ...@@ -372,7 +372,6 @@ NULL
/* PUBSUB NUMPAT */ /* PUBSUB NUMPAT */
addReplyLongLong(c,listLength(server.pubsub_patterns)); addReplyLongLong(c,listLength(server.pubsub_patterns));
} else { } else {
addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try PUBSUB HELP", addReplySubSyntaxError(c);
(char*)c->argv[1]->ptr);
} }
} }
...@@ -1514,7 +1514,7 @@ NULL ...@@ -1514,7 +1514,7 @@ NULL
return; return;
} }
} else { } else {
addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try SCRIPT HELP", (char*)c->argv[1]->ptr); addReplySubSyntaxError(c);
} }
} }
......
...@@ -2866,7 +2866,7 @@ NULL ...@@ -2866,7 +2866,7 @@ NULL
for (j = 0; j < numkeys; j++) addReplyBulk(c,c->argv[keys[j]+2]); for (j = 0; j < numkeys; j++) addReplyBulk(c,c->argv[keys[j]+2]);
getKeysFreeResult(keys); getKeysFreeResult(keys);
} else { } else {
addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try COMMAND HELP", (char*)c->argv[1]->ptr); addReplySubSyntaxError(c);
} }
} }
......
...@@ -187,6 +187,6 @@ NULL ...@@ -187,6 +187,6 @@ NULL
} }
setDeferredMultiBulkLength(c,totentries,sent); setDeferredMultiBulkLength(c,totentries,sent);
} else { } else {
addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try SLOWLOG HELP", (char*)c->argv[1]->ptr); addReplySubSyntaxError(c);
} }
} }
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