HandyOrg/HandyControl · error · InvalidOperationException
TokenizerHelperMissingEndQuote
Error message
TokenizerHelperMissingEndQuote
What it means
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.
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/Shared/HandyControl_Shared/Tools/Helper/TokenizerHelper.cs:143 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HandyOrg/HandyControl@2c0875ebd6 (2026-09-14).
Data as JSON: /api/errors/fdd56550e847927e.
Report an issue: GitHub.
Appendix: source
Thrown at src/Shared/HandyControl_Shared/Tools/Helper/TokenizerHelper.cs:143
}
else if (char.IsWhiteSpace(currentChar) || currentChar == separator)
{
if (currentChar == separator)
{
FoundSeparator = true;
}
break;
}
++_charIndex;
++newTokenLength;
}
// if quoteCount isn't zero we hit the end of the string
// before the ending quote
if (quoteCount > 0)
{
throw new InvalidOperationException("TokenizerHelperMissingEndQuote");
}
ScanToNextToken(separator); // move so at the start of the nextToken for next call
// finally made it, update the _currentToken values
_currentTokenIndex = newTokenIndex;
_currentTokenLength = newTokenLength;
if (_currentTokenLength < 1)
{
throw new InvalidOperationException("TokenizerHelperEmptyToken");
}
return true;
}
private void ScanToNextToken(char separator)
{View on GitHub (pinned to 2c0875ebd6)