Better exception message during Tuple JSON deserialization

This commit is contained in:
Kruglov Pavel 2023-02-22 14:37:55 +01:00 committed by GitHub
parent 9d116e6f5c
commit e433ecc18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,7 +231,15 @@ void SerializationTuple::deserializeTextJSON(IColumn & column, ReadBuffer & istr
seen_elements[element_pos] = 1; seen_elements[element_pos] = 1;
auto & element_column = extractElementColumn(column, element_pos); auto & element_column = extractElementColumn(column, element_pos);
elems[element_pos]->deserializeTextJSON(element_column, istr, settings); try
{
elems[element_pos]->deserializeTextJSON(element_column, istr, settings);
}
catch (Exception & e)
{
e.addMessage("(while reading the value of nested key " + name + ")");
throw;
}
skipWhitespaceIfAny(istr); skipWhitespaceIfAny(istr);
++processed; ++processed;