diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-09-16 15:31:15 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-09-17 14:43:21 +0200 |
commit | 59a0ce6d9df4465f2a7e6cbeb78a339f30574ae6 (patch) | |
tree | 8c42280acfc5603bcf1f4734cf29a05d0263286e /src/buildtool/execution_engine/executor/executor.hpp | |
parent | a1b45eef0a50da931a2c46fe842631d27ca4be56 (diff) | |
download | justbuild-59a0ce6d9df4465f2a7e6cbeb78a339f30574ae6.tar.gz |
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.
Diffstat (limited to 'src/buildtool/execution_engine/executor/executor.hpp')
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 14 |
1 files changed, 10 insertions, 4 deletions
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(); |