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 authored and kelson42 committed Jun 22, 2024
1 parent 82817b5 commit b1c15dc
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 b1c15dc

Please sign in to comment.