MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getUnmatchedParenthesesErrorMessage

Function getUnmatchedParenthesesErrorMessage

src/Parsers/parseQuery.cpp:209–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207
208
209std::string getUnmatchedParenthesesErrorMessage(
210 const char * begin,
211 const char * end,
212 const UnmatchedParentheses & unmatched_parens,
213 bool hilite,
214 const std::string & query_description)
215{
216 WriteBufferFromOwnString out;
217 writeCommonErrorMessage(out, begin, end, unmatched_parens[0], query_description);
218 writeQueryAroundTheError(out, begin, end, hilite, unmatched_parens.data(), unmatched_parens.size());
219
220 out << "Unmatched parentheses: ";
221 for (const Token & paren : unmatched_parens)
222 out << *paren.begin;
223
224 return out.str();
225}
226
227}
228

Callers 1

tryParseQueryFunction · 0.70

Calls 5

writeCommonErrorMessageFunction · 0.70
writeQueryAroundTheErrorFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected