From 09f43d21a843d10cd0d8f0e5430ac083598714e3 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Fri, 10 Sep 2021 00:02:04 +0300 Subject: [PATCH] client: print query on client exception only in non-interactive mode --- programs/client/Client.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/programs/client/Client.cpp b/programs/client/Client.cpp index 4e59cca2024..c594f01861b 100644 --- a/programs/client/Client.cpp +++ b/programs/client/Client.cpp @@ -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