dbms: Client: don't write message about syntax error two times in non-interactive mode [#METR-8967].

This commit is contained in:
Alexey Milovidov 2013-10-22 16:37:46 +00:00
parent 2320e08fd9
commit 542e79fed4

View File

@ -538,9 +538,9 @@ private:
<< ", expected " << (parse_res ? "end of query" : expected) << "."
<< std::endl << std::endl;
std::cerr << message.str();
if (!is_interactive)
if (is_interactive)
std::cerr << message.str();
else
throw Exception(message.str(), ErrorCodes::SYNTAX_ERROR);
return false;