client: print query on client exception only in non-interactive mode

This commit is contained in:
Azat Khuzhin 2021-09-10 00:02:04 +03:00
parent f0f31ab8f3
commit 09f43d21a8

View File

@ -1046,11 +1046,15 @@ private:
if (client_exception)
{
fmt::print(stderr, "Error on processing query '{}':\n{}\n", full_query, client_exception->message());
fmt::print(stderr, "Error on processing query: {}\n", client_exception->message());
if (is_interactive)
{
fmt::print(stderr, "\n");
}
else
{
fmt::print(stderr, "(query: {})\n", full_query);
}
}
// A debug check -- at least some exception must be set, if the error