mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
More gentle exception messages
This commit is contained in:
parent
628d78f4f1
commit
4085782b05
@ -1313,7 +1313,7 @@ public:
|
|||||||
else if constexpr (std::is_same_v<Name, NameToDecimal256>)
|
else if constexpr (std::is_same_v<Name, NameToDecimal256>)
|
||||||
return createDecimalMaxPrecision<Decimal256>(scale);
|
return createDecimalMaxPrecision<Decimal256>(scale);
|
||||||
|
|
||||||
throw Exception("Something wrong with toDecimalNN()", ErrorCodes::LOGICAL_ERROR);
|
throw Exception("Unexpected branch in code of conversion function: it is a bug.", ErrorCodes::LOGICAL_ERROR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1337,7 +1337,7 @@ public:
|
|||||||
if constexpr (std::is_same_v<ToDataType, DataTypeDateTime>)
|
if constexpr (std::is_same_v<ToDataType, DataTypeDateTime>)
|
||||||
return std::make_shared<DataTypeDateTime>(extractTimeZoneNameFromFunctionArguments(arguments, timezone_arg_position, 0));
|
return std::make_shared<DataTypeDateTime>(extractTimeZoneNameFromFunctionArguments(arguments, timezone_arg_position, 0));
|
||||||
else if constexpr (std::is_same_v<ToDataType, DataTypeDateTime64>)
|
else if constexpr (std::is_same_v<ToDataType, DataTypeDateTime64>)
|
||||||
throw Exception("LOGICAL ERROR: It is a bug.", ErrorCodes::LOGICAL_ERROR);
|
throw Exception("Unexpected branch in code of conversion function: it is a bug.", ErrorCodes::LOGICAL_ERROR);
|
||||||
else
|
else
|
||||||
return std::make_shared<ToDataType>();
|
return std::make_shared<ToDataType>();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user