Merge "Add context to error message."

This commit is contained in:
Treehugger Robot
2022-04-01 22:14:12 +00:00
committed by Gerrit Code Review

View File

@@ -349,7 +349,7 @@ Maybe<std::vector<std::string>> FindFiles(const android::StringPiece& path, IDia
const std::string root_dir = path.to_string();
std::unique_ptr<DIR, decltype(closedir)*> d(opendir(root_dir.data()), closedir);
if (!d) {
diag->Error(DiagMessage() << SystemErrorCodeToString(errno));
diag->Error(DiagMessage() << SystemErrorCodeToString(errno) << ": " << root_dir);
return {};
}