From 99915fa444f24a40b91a2f14031fd5c22d792187 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Thu, 1 Oct 2020 14:00:58 +0300 Subject: [PATCH] remove unrelated changes --- src/Common/Exception.h | 7 ++----- src/Core/BaseSettings.h | 22 +++++++--------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/Common/Exception.h b/src/Common/Exception.h index d0de8d6a3f2..763b90048bb 100644 --- a/src/Common/Exception.h +++ b/src/Common/Exception.h @@ -39,11 +39,8 @@ public: const char * name() const throw() override { return "DB::Exception"; } const char * what() const throw() override { return message().data(); } - template - void addMessage(Fmt&&... fmt) - { - extendedMessage(fmt::format(std::forward(fmt)...)); - } + /// Add something to the existing message. + void addMessage(const std::string & arg) { extendedMessage(arg); } std::string getStackTraceString() const; diff --git a/src/Core/BaseSettings.h b/src/Core/BaseSettings.h index b193fdd4c93..7de87b345c1 100644 --- a/src/Core/BaseSettings.h +++ b/src/Core/BaseSettings.h @@ -390,21 +390,13 @@ String BaseSettings::valueToStringUtil(const std::string_view & name, c template Field BaseSettings::stringToValueUtil(const std::string_view & name, const String & str) { - try - { - const auto & accessor = Traits::Accessor::instance(); - if (size_t index = accessor.find(name); index != static_cast(-1)) - return accessor.stringToValueUtil(index, str); - if constexpr (Traits::allow_custom_settings) - return Field::restoreFromDump(str); - else - BaseSettingsHelpers::throwSettingNotFound(name); - } - catch (Exception & e) - { - e.addMessage("while parsing value '{}' for setting '{}'", str, name); - throw; - } + const auto & accessor = Traits::Accessor::instance(); + if (size_t index = accessor.find(name); index != static_cast(-1)) + return accessor.stringToValueUtil(index, str); + if constexpr (Traits::allow_custom_settings) + return Field::restoreFromDump(str); + else + BaseSettingsHelpers::throwSettingNotFound(name); } template