From 59a0ce6d9df4465f2a7e6cbeb78a339f30574ae6 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 16 Sep 2024 15:31:15 +0200 Subject: Small code improvements based on lint warnings - add more noexcept requirements and enforce existing - fixing inconsistencies related to function arguments - remove redundant static keywords - silencing excessive lint reporting in test cases While there, make more getters const ref. --- src/buildtool/execution_engine/executor/executor.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/buildtool/execution_engine/executor/executor.hpp') diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index d0bc7aee..097284e1 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -972,11 +972,17 @@ class Rebuilder { return artifacts_cached.error(); } std::ostringstream msg{}; - for (auto const& [path, info] : *artifacts.value()) { - auto const& info_cached = artifacts_cached.value()->at(path); - if (info != info_cached) { - RecordFlakyAction(&msg, action, path, info, info_cached); + try { + for (auto const& [path, info] : *artifacts.value()) { + auto const& info_cached = + artifacts_cached.value()->at(path); + if (info != info_cached) { + RecordFlakyAction( + &msg, action, path, info, info_cached); + } } + } catch (std::exception const& ex) { + return ex.what(); } if (msg.tellp() > 0) { stats.IncrementActionsFlakyCounter(); -- cgit v1.2.3