Update Client.cpp

This commit is contained in:
Kseniia Sumarokova 2021-10-25 10:47:22 +03:00 committed by GitHub
parent 490ca93162
commit 15bdfdc9f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -488,8 +488,8 @@ try
}
catch (const Exception & e)
{
bool print_stack_trace = config().getBool("stacktrace", false) && e.code() != ErrorCodes::NETWORK_ERROR;
std::cerr << getExceptionMessage(e, print_stack_trace, true) << std::endl << std::endl;
bool need_print_stack_trace = config().getBool("stacktrace", false) && e.code() != ErrorCodes::NETWORK_ERROR;
std::cerr << getExceptionMessage(e, need_print_stack_trace, true) << std::endl << std::endl;
/// If exception code isn't zero, we should return non-zero return code anyway.
return e.code() ? e.code() : -1;
}