internal static Exception MasterOnly(bool includeDetail, RedisCommand command, Message message, ServerEndPoint server)
        {
            string s  = GetLabel(includeDetail, command, message);
            var    ex = new RedisCommandException("Command cannot be issued to a slave: " + s);

            if (includeDetail)
            {
                AddDetail(ex, message, server, s);
            }
            return(ex);
        }
        internal static Exception DatabaseRequired(bool includeDetail, RedisCommand command)
        {
            string s  = command.ToString();
            var    ex = new RedisCommandException("A target database is required for " + s);

            if (includeDetail)
            {
                AddDetail(ex, null, null, s);
            }
            return(ex);
        }
        internal static Exception NotSupported(bool includeDetail, RedisCommand command)
        {
            string s  = GetLabel(includeDetail, command, null);
            var    ex = new RedisCommandException("Command is not available on your server: " + s);

            if (includeDetail)
            {
                AddDetail(ex, null, null, s);
            }
            return(ex);
        }
        internal static Exception AdminModeNotEnabled(bool includeDetail, RedisCommand command, Message message, ServerEndPoint server)
        {
            string s  = GetLabel(includeDetail, command, message);
            var    ex = new RedisCommandException("This operation is not available unless admin mode is enabled: " + s);

            if (includeDetail)
            {
                AddDetail(ex, message, server, s);
            }
            return(ex);
        }
        internal static Exception CommandDisabled(bool includeDetail, string command, Message message, ServerEndPoint server)
        {
            string s  = GetLabel(includeDetail, command, message);
            var    ex = new RedisCommandException("This operation has been disabled in the command-map and cannot be used: " + s);

            if (includeDetail)
            {
                AddDetail(ex, message, server, s);
            }
            return(ex);
        }
        internal static Exception TooManyArgs(bool includeDetail, string command, Message message, ServerEndPoint server, int required)
        {
            string s  = GetLabel(includeDetail, command, message);
            var    ex = new RedisCommandException($"This operation would involve too many arguments ({required} vs the redis limit of {PhysicalConnection.REDIS_MAX_ARGS}): {s}");

            if (includeDetail)
            {
                AddDetail(ex, message, server, s);
            }
            return(ex);
        }