Address review comments

This commit is contained in:
Alexey Milovidov 2023-11-23 18:13:12 +01:00
parent d59b322619
commit b62e9d3a1a
6 changed files with 8 additions and 7 deletions

View File

@ -325,7 +325,7 @@ try
processConfig();
adjustSettings();
initTtyBuffer(toProgressOption(config().getString("progress", "default")));
initTTYBuffer(toProgressOption(config().getString("progress", "default")));
{
// All that just to set DB::CurrentThread::get().getGlobalContext()
@ -1459,7 +1459,6 @@ int mainEntryClickHouseClient(int argc, char ** argv)
DB::Client client;
// Initialize command line options
client.init(argc, argv);
/// Initialize config file
return client.run();
}
catch (const DB::Exception & e)

View File

@ -556,7 +556,8 @@ catch (...)
{
/// Poco does not provide stacktrace.
tryLogCurrentException("Application");
return getCurrentExceptionCode();
auto code = getCurrentExceptionCode();
return code ? code : -1;
}

View File

@ -495,7 +495,7 @@ try
processConfig();
adjustSettings();
initTtyBuffer(toProgressOption(config().getString("progress", "default")));
initTTYBuffer(toProgressOption(config().getString("progress", "default")));
applyCmdSettings(global_context);

View File

@ -1970,7 +1970,8 @@ catch (...)
{
/// Poco does not provide stacktrace.
tryLogCurrentException("Application");
return getCurrentExceptionCode();
auto code = getCurrentExceptionCode();
return code ? code : -1;
}
std::unique_ptr<TCPProtocolStackFactory> Server::buildProtocolStackFromConfig(

View File

@ -722,7 +722,7 @@ void ClientBase::adjustSettings()
global_context->setSettings(settings);
}
void ClientBase::initTtyBuffer(ProgressOption progress)
void ClientBase::initTTYBuffer(ProgressOption progress)
{
if (tty_buf)
return;

View File

@ -185,7 +185,7 @@ protected:
/// Adjust some settings after command line options and config had been processed.
void adjustSettings();
void initTtyBuffer(ProgressOption progress);
void initTTYBuffer(ProgressOption progress);
/// Should be one of the first, to be destroyed the last,
/// since other members can use them.