{"record":{"id":"fe82e01029595a5a","repo":"Humanizr/Humanizer","slug":"linked-vigesimal-number-profiles-require-a-lexical","errorCode":null,"errorMessage":"Linked-vigesimal number profiles require a lexical word table or scale row covering the requested value.","messagePattern":"Linked-vigesimal number profiles require a lexical word table or scale row covering the requested value\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Humanizer/Localisation/NumberToWords/LinkedVigesimalNumberToWordsConverter.cs","lineNumber":78,"sourceCode":"\n        var parts = new List<string>();\n        var remainder = number;\n        foreach (var scale in profile.Scales)\n        {\n            var scaleValue = (ulong)scale.Value;\n            var count = remainder / scaleValue;\n            if (count == 0)\n            {\n                continue;\n            }\n\n            remainder %= scaleValue;\n            parts.Add(FormatScale(count, scale, remainder > 0));\n        }\n\n        if (parts.Count == 0)\n        {\n            throw new InvalidOperationException(\"Linked-vigesimal number profiles require a lexical word table or scale row covering the requested value.\");\n        }\n\n        if (remainder > 0)\n        {\n            var renderedRemainder = ConvertPositive(remainder);\n            if (remainder < (ulong)profile.TerminalRemainderThreshold)\n            {\n                parts.Add(profile.GetTerminalRemainderJoiner(renderedRemainder));\n            }\n\n            parts.Add(renderedRemainder);\n        }\n\n        return string.Join(profile.PartJoiner, parts);\n    }\n\n    string FormatScale(ulong count, LinkedVigesimalScale scale, bool hasRemainder)\n    {","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer/Localisation/NumberToWords/LinkedVigesimalNumberToWordsConverter.cs#L60-L96","documentation":"ConvertPositive produced no scale parts and the value exceeded the lexicalized Words table — no scale row and no word covered it. The guard prevents emitting an empty or garbage string. Indicates the profile's scales don't reach the requested magnitude for this linked-vigesimal locale.","triggerScenarios":"value.ToWords(<linked-vigesimal culture>) for a value beyond the Words table length and not covered by any scale row (parts.Count == 0 after the scale loop).","commonSituations":"Locale profile with scales that don't extend high enough for the input magnitude; a value larger than the largest authored scale plus the Words range.","solutions":["Report the locale bug / request higher scales for the locale.","Use a locale with broader numeric coverage.","Clamp inputs to the locale's supported range."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Scale/word coverage is internal. No public pre-check; wrap Convert and fall back.","typeGuard":null,"tryCatchPattern":"string words;\ntry\n{\n    words = value.ToWords(culture);\n}\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"lexical word table or scale row\"))\n{\n    words = value.ToWords(CultureInfo.InvariantCulture);\n}","preventionTips":["Bound numeric inputs before localizing for linked-vigesimal locales.","Request broader scale coverage upstream if needed.","Smoke-test a spread of magnitudes per locale after upgrades."],"tags":["number-to-words","profile-data","localization"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}