Skip to content

Commit

Permalink
fixup! Add a check kind to check clusters' content.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr committed Jun 17, 2024
1 parent 91ec1fe commit 58a727b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/fileimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,13 @@ class Grouping
const cluster_index_type clusterCount = getCountClusters().v;
for ( cluster_index_type i = 0; i < clusterCount; ++i )
{
// For a read of each clusters (which will throw ZimFileFormatError in case of error)
readCluster(cluster_index_t(i));
// Force a read of each clusters (which will throw ZimFileFormatError in case of error)
try {
readCluster(cluster_index_t(i));
} catch (ZimFileFormatError& e) {
std::cerr << e.what() << std::endl;
return false;
}
}
return true;
}
Expand Down

0 comments on commit 58a727b

Please sign in to comment.