MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / validateFloatingPointSettingValue

Function validateFloatingPointSettingValue

src/Core/SettingsFields.cpp:50–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48{
49 template<typename T>
50 void validateFloatingPointSettingValue(T value)
51 {
52 if constexpr (std::is_floating_point_v<T>)
53 {
54 if (!std::isfinite(value))
55 throw Exception(ErrorCodes::CANNOT_PARSE_NUMBER,
56 "Float setting value must be finite, got {}", value);
57 }
58 }
59
60 template <typename T>
61 T stringToNumber(const String & str)

Callers 4

stringToNumberFunction · 0.85
fieldToNumberFunction · 0.85
SettingFieldNumberMethod · 0.85
SettingsFields.cppFile · 0.85

Calls 1

ExceptionClass · 0.50

Tested by

no test coverage detected