Skip to content

Commit

Permalink
Merge pull request fast-pack#105 from lemire/dlemire/issue_99
Browse files Browse the repository at this point in the history
Adding try/catch
  • Loading branch information
lemire authored Mar 22, 2023
2 parents b81db96 + 97dc9f2 commit 70e176f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions headers/deltautil.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ class Delta {
container backupdata;
backupdata.reserve(maxlength + 2048 + 64);
for (auto i = myalgos.begin(); i != myalgos.end(); ++i) {
try {
IntegerCODEC &c = *(i->algo);
const bool SIMDDeltas = i->SIMDDeltas;
size_t nvalue;
Expand Down Expand Up @@ -492,9 +493,6 @@ class Delta {
<< recoveredsize << std::endl;
throw std::logic_error("arrays don't have same size: bug.");
}
// if (!equal(datas[k].begin(), datas[k].end(), recov)) {
// throw std::logic_error("we have a bug");
//}
for (size_t i = 0; i < datas[k].size(); i++) {
if (datas[k][i] != recov[i]) {
std::cout << "difference at index " << i << ":" << std::endl;
Expand Down Expand Up @@ -559,6 +557,7 @@ class Delta {
<< "\t";
std::cout << "\t";
}
} catch(...) {}
}
if (pp.fulldisplay)
std::cout << std::endl;
Expand Down

0 comments on commit 70e176f

Please sign in to comment.