mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 17:51:21 +00:00
Adds MODULE HELP and implements addReplySubSyntaxError
This commit is contained in:
@ -560,6 +560,18 @@ void addReplyHelp(client *c, const char **help) {
|
||||
setDeferredMultiBulkLength(c,blenp,blen);
|
||||
}
|
||||
|
||||
/* Add a suggestive error reply.
|
||||
* This function is typically invoked by from commands that support
|
||||
* subcommands in response to an unknown subcommand or argument error. */
|
||||
void addReplySubSyntaxError(client *c) {
|
||||
sds cmd = sdsnew((char*) c->argv[0]->ptr);
|
||||
sdstoupper(cmd);
|
||||
addReplyErrorFormat(c,
|
||||
"Unknown subcommand or wrong number of arguments for '%s'. Try %s HELP.",
|
||||
c->argv[1]->ptr,cmd);
|
||||
sdsfree(cmd);
|
||||
}
|
||||
|
||||
/* Copy 'src' client output buffers into 'dst' client output buffers.
|
||||
* The function takes care of freeing the old output buffers of the
|
||||
* destination client. */
|
||||
|
Reference in New Issue
Block a user