Add clear exception in case of incorrect parameter type
@@ -143,8 +143,12 @@ namespace NCatboostOptions {
const auto& key = dst->OptionName;
if (src.Has(key)) {
const auto& srcValue = src[key];
+ try {
TJsonFieldHelper<T>::Read(srcValue, &dst->Value);
dst->IsSetFlag = true;
+ } catch (NJson::TJsonException) {
+ ythrow TCatboostException() << "Can't parse parameter \"" << key << "\" with value: " << srcValue;
+ }
return true;
} else {
return false;
