[tf.data] Add more information to uncompress error message.

PiperOrigin-RevId: 331239970
Change-Id: Ic41c25221ad4137eae62709519a254f2a849d7d8
This commit is contained in:
Andrew Audibert 2020-09-11 15:55:38 -07:00 committed by TensorFlower Gardener
parent 067e585de7
commit 47a06f4041

View File

@ -114,7 +114,9 @@ Status UncompressElement(const CompressedElement& compressed,
size_t uncompressed_size;
if (!port::Snappy_GetUncompressedLength(
compressed_data.data(), compressed_data.size(), &uncompressed_size)) {
return errors::Internal("Could not get snappy uncompressed length");
return errors::Internal(
"Could not get snappy uncompressed length. Compressed data size: ",
compressed_data.size());
}
if (uncompressed_size != static_cast<size_t>(total_size)) {
return errors::Internal(