{"record":{"id":"060d828d57925cfc","repo":"AvaloniaUI/Avalonia","slug":"too-many-provided-values","errorCode":null,"errorMessage":"Too many provided values.","messagePattern":"Too many provided values\\.","errorType":"validation","errorClass":"FormatException","httpStatus":null,"severity":"error","filePath":"src/Avalonia.Base/Media/Transformation/TransformParser.cs","lineNumber":157,"sourceCode":"                    rightValue = ParseValue(rightPart);\n\n                    return 2;\n                }\n\n                leftValue = ParseValue(part);\n\n                return 1;\n            }\n\n            static int ParseCommaDelimitedValues(ReadOnlySpan<char> part, in Span<UnitValue> outValues)\n            {\n                int valueIndex = 0;\n\n                while (true)\n                {\n                    if (valueIndex >= outValues.Length)\n                    {\n                        throw new FormatException(\"Too many provided values.\");\n                    }\n\n                    var commaIndex = part.IndexOf(',');\n\n                    if (commaIndex == -1)\n                    {\n                        if (!part.IsWhiteSpace())\n                        {\n                            outValues[valueIndex++] = ParseValue(part);\n                        }\n\n                        break;\n                    }\n\n                    var valuePart = part.Slice(0, commaIndex).Trim();\n\n                    outValues[valueIndex++] = ParseValue(valuePart);\n","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/AvaloniaUI/Avalonia/blob/11c542726898ae954a1ef668c65ec79ec92ab17d/src/Avalonia.Base/Media/Transformation/TransformParser.cs#L139-L175","documentation":"Thrown inside TransformParser.ParseCommaDelimitedValues when the number of comma-separated values in a transform function argument list exceeds the capacity of the output span (outValues). Each transform function expects a fixed maximum number of arguments; supplying more than that triggers this FormatException.","triggerScenarios":"Providing a transform function with too many comma-delimited arguments, e.g. translate(10px, 20px, 30px) when the function only accepts two. The parser iterates values and, once valueIndex reaches outValues.Length, it throws 'Too many provided values.'","commonSituations":"Hand-authored CSS/XAML transforms with extra arguments; copy-pasting a 3D transform (translate3d, scale3d) into a 2D-only context; misunderstanding the argument count a given function accepts.","solutions":["Check the expected argument count for the transform function and remove extras.","Refer to the function's documented value count (reported separately via error 327) to match the call.","If a 3D transform is needed, confirm the platform/build supports it or use the appropriate 3D-capable API."],"exampleFix":"// before\nvar t = TransformOperations.Parse(\"translate(10px, 20px, 30px)\"); // too many values\n\n// after\nvar t = TransformOperations.Parse(\"translate(10px, 20px)\");","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { return TransformOperations.Parse(s); }\ncatch (FormatException) { /* fix arg count and retry */ }","preventionTips":["Match the number of comma-delimited arguments to each function's expected count.","Avoid 3D transform syntax in 2D-only contexts.","Cross-check argument counts against the function documentation."],"tags":["transform","parse","format-exception","argument-count","avalonia"],"backgroundTag":null,"analyzedSha":"11c542726898ae954a1ef668c65ec79ec92ab17d","analyzedAt":"2026-08-13T11:57:40.261Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}