• Binbin's avatar
    Add RM_ReplyWithErrorFormat that can support format (#11923) · bfec2d70
    Binbin authored
    * Add RM_ReplyWithErrorFormat that can support format
    
    Reply with the error create from a printf format and arguments.
    
    If the error code is already passed in the string 'fmt', the error
    code provided is used, otherwise the string "-ERR " for the generic
    error code is automatically added.
    
    The usage is, for example:
        RedisModule_ReplyWithErrorFormat(ctx, "An error: %s", "foo");
        RedisModule_ReplyWithErrorFormat(ctx, "-WRONGTYPE Wrong Type: %s", "foo");
    
    The function always returns REDISMODULE_OK.
    bfec2d70
networking.c 174 KB