}
} while (it-- != itStart);
} else {
- for (auto& step : steps_) {
+ if (it == itEnd)
+ --it;
+ do {
try {
- TTRACE(TTRACE_TAG_APP, "%s_%s", step->name(), "clean");
- if (step->clean() != Step::Status::OK) {
- LOG(ERROR) << "Error during clean operation(" << step->name() << ")";
+ TTRACE(TTRACE_TAG_APP, "%s_%s", (*it)->name(), "clean");
+ if ((*it)->clean() != Step::Status::OK) {
+ LOG(ERROR) << "Error during clean operation(" << (*it)->name() << ")";
ret = Result::CLEANUP_ERROR;
break;
}
} catch (const std::exception& err) {
LOG(ERROR) << "Exception occurred in clean(): " << err.what()
- << " in step: " << step->name();
+ << " in step: " << (*it)->name();
ret = Result::CLEANUP_ERROR;
break;
}
- }
+ } while (it-- != itStart);
}
sync();