mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
client: print full query in case of server exception
This commit is contained in:
parent
af5072db50
commit
f0f31ab8f3
@ -1031,10 +1031,17 @@ private:
|
|||||||
if (server_exception)
|
if (server_exception)
|
||||||
{
|
{
|
||||||
bool print_stack_trace = config().getBool("stacktrace", false);
|
bool print_stack_trace = config().getBool("stacktrace", false);
|
||||||
std::cerr << "Received exception from server (version " << server_version << "):" << std::endl
|
fmt::print(stderr, "Received exception from server (version {}):\n{}\n",
|
||||||
<< getExceptionMessage(*server_exception, print_stack_trace, true) << std::endl;
|
server_version,
|
||||||
|
getExceptionMessage(*server_exception, print_stack_trace, true));
|
||||||
if (is_interactive)
|
if (is_interactive)
|
||||||
std::cerr << std::endl;
|
{
|
||||||
|
fmt::print(stderr, "\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fmt::print(stderr, "(query: {})\n", full_query);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client_exception)
|
if (client_exception)
|
||||||
|
Loading…
Reference in New Issue
Block a user