@@ -82,7 +82,7 @@ Status ReadBlock(RandomAccessFile* file,
8282 }
8383 if (contents.size () != n + kBlockTrailerSize ) {
8484 delete[] buf;
85- return Status::Corruption (" truncated block read" );
85+ return Status::Corruption (" truncated block read" , file-> GetName () );
8686 }
8787
8888 // Check the crc of the type and the block contents
@@ -92,7 +92,7 @@ Status ReadBlock(RandomAccessFile* file,
9292 const uint32_t actual = crc32c::Value (data, n + 1 );
9393 if (actual != crc) {
9494 delete[] buf;
95- s = Status::Corruption (" block checksum mismatch" );
95+ s = Status::Corruption (" block checksum mismatch" , file-> GetName () );
9696 return s;
9797 }
9898 }
@@ -119,13 +119,13 @@ Status ReadBlock(RandomAccessFile* file,
119119 size_t ulength = 0 ;
120120 if (!port::Snappy_GetUncompressedLength (data, n, &ulength)) {
121121 delete[] buf;
122- return Status::Corruption (" corrupted compressed block contents" );
122+ return Status::Corruption (" corrupted compressed block contents" , file-> GetName () );
123123 }
124124 char * ubuf = new char [ulength];
125125 if (!port::Snappy_Uncompress (data, n, ubuf)) {
126126 delete[] buf;
127127 delete[] ubuf;
128- return Status::Corruption (" corrupted compressed block contents" );
128+ return Status::Corruption (" corrupted compressed block contents" , file-> GetName () );
129129 }
130130 delete[] buf;
131131 result->data = Slice (ubuf, ulength);
@@ -135,7 +135,7 @@ Status ReadBlock(RandomAccessFile* file,
135135 }
136136 default :
137137 delete[] buf;
138- return Status::Corruption (" bad block type" );
138+ return Status::Corruption (" bad block type" , file-> GetName () );
139139 }
140140
141141 return Status::OK ();
0 commit comments