SolidWallOfCode commented on code in PR #10112:
URL: https://github.com/apache/trafficserver/pull/10112#discussion_r1279405561
##########
mgmt/config/FileManager.cc:
##########
@@ -163,17 +161,20 @@ FileManager::getConfigObj(const char *fileName,
ConfigManager **rbPtr)
return found;
}
-ts::Errata
+swoc::Errata
FileManager::fileChanged(std::string const &fileName, std::string const
&configName)
{
Debug("filemanager", "file changed %s", fileName.c_str());
- ts::Errata ret;
+ swoc::Errata ret;
std::lock_guard<std::mutex> guard(_callbacksMutex);
for (auto const &call : _configCallbacks) {
if (auto const &r = call(fileName, configName); !r) {
Debug("filemanager", "something back from callback %s",
fileName.c_str());
- std::for_each(r.begin(), r.end(), [&ret](auto &&e) { ret.push(e); });
+ if (ret.empty()) {
+ ret.note("Errors while reloading configurations.");
+ }
+ ret.note(r);
Review Comment:
I disagree. The check provides additional context for the more local error,
e.g. whether it happened during configuration loading, or key file loading, etc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]