Skip to content

Commit

Permalink
stop ignoring previous_operation_error in merge_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Woz authored and avsej committed Jun 24, 2024
1 parent fc62fb1 commit 4694065
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/transactions/internal/exceptions_internal.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,9 @@ public:
// is false. Not rolling back takes precedence over retry. Otherwise, we
// just retain the first.
assert(errors.size() > 0);
// start with first error that isn't previous_operation_failed
auto error_to_throw = *(std::find_if(errors.begin(), errors.end(), [](auto& err) {
return err.cause() != external_exception::PREVIOUS_OPERATION_FAILED;
}));
// start with first error
auto error_to_throw = errors.front();
for (auto& ex : errors) {
if (ex.cause() == external_exception::PREVIOUS_OPERATION_FAILED) {
continue;
}
if (!ex.retry_) {
error_to_throw = ex;
}
Expand Down

0 comments on commit 4694065

Please sign in to comment.