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

Function getSyntaxErrorMessage

src/Parsers/parseQuery.cpp:175–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173
174
175std::string getSyntaxErrorMessage(
176 const char * begin,
177 const char * end,
178 Token last_token,
179 const Expected & expected,
180 bool hilite,
181 const std::string & query_description)
182{
183 WriteBufferFromOwnString out;
184 writeCommonErrorMessage(out, begin, end, last_token, query_description);
185 writeQueryAroundTheError(out, begin, end, hilite, &last_token, 1);
186
187 if (!expected.variants.empty())
188 out << "Expected " << expected;
189
190 return out.str();
191}
192
193
194std::string getLexicalErrorMessage(

Callers 1

tryParseQueryFunction · 0.70

Calls 4

writeCommonErrorMessageFunction · 0.70
writeQueryAroundTheErrorFunction · 0.70
emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected