{"record":{"id":"fdd56550e847927e","repo":"HandyOrg/HandyControl","slug":"tokenizerhelpermissingendquote","errorCode":null,"errorMessage":"TokenizerHelperMissingEndQuote","messagePattern":"TokenizerHelperMissingEndQuote","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Shared/HandyControl_Shared/Tools/Helper/TokenizerHelper.cs","lineNumber":143,"sourceCode":"            }\n            else if (char.IsWhiteSpace(currentChar) || currentChar == separator)\n            {\n                if (currentChar == separator)\n                {\n                    FoundSeparator = true;\n                }\n                break;\n            }\n\n            ++_charIndex;\n            ++newTokenLength;\n        }\n\n        // if quoteCount isn't zero we hit the end of the string\n        // before the ending quote\n        if (quoteCount > 0)\n        {\n            throw new InvalidOperationException(\"TokenizerHelperMissingEndQuote\");\n        }\n\n        ScanToNextToken(separator); // move so at the start of the nextToken for next call\n\n        // finally made it, update the _currentToken values\n        _currentTokenIndex = newTokenIndex;\n        _currentTokenLength = newTokenLength;\n\n        if (_currentTokenLength < 1)\n        {\n            throw new InvalidOperationException(\"TokenizerHelperEmptyToken\");\n        }\n\n        return true;\n    }\n\n    private void ScanToNextToken(char separator)\n    {","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/HandyOrg/HandyControl/blob/2c0875ebd67326e0c67282967e3e809c69282fee/src/Shared/HandyControl_Shared/Tools/Helper/TokenizerHelper.cs#L125-L161","documentation":"Sentinel validation error inside NextToken: while scanning a token the parser counted an opening quote but reached the end of the string before finding the matching closing quote (quoteCount > 0). The input token stream is malformed — an unbalanced quote in a value — and the helper aborts tokenization rather than return a truncated token.","triggerScenarios":"Thrown at src/Shared/HandyControl_Shared/Tools/Helper/TokenizerHelper.cs:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the source string being tokenized: ensure every quoted token has both opening and closing quotes (e.g. '\"value\"' not '\"value')","Pre-validate input before tokenizing: reject or escape stray quotes, and pair/unbalance-check quotes before calling NextToken in a loop","If partial parsing is acceptable, catch InvalidOperationException around NextToken and fall back to treating the remainder as a single literal token"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0875ebd67326e0c67282967e3e809c69282fee","analyzedAt":"2026-09-14T14:45:29.754Z","contentChangedAt":"2026-09-14T14:45:29.754Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}