Helper function to rename the bad file.
| 188 | |
| 189 | // Helper function to rename the bad file. |
| 190 | static void MoveBadDebugCacheFile(const string& file_path) { |
| 191 | DCHECK(!file_path.empty()); |
| 192 | string new_path = file_path + DEBUG_TUPLE_CACHE_BAD_POSTFIX; |
| 193 | int result = rename(file_path.c_str(), new_path.c_str()); |
| 194 | if (result != 0) { |
| 195 | string error_msg = GetStrErrMsg(); |
| 196 | LOG(ERROR) << "Failed to move debug tuple cache file from " << file_path << " to " |
| 197 | << new_path << ". Error message: " << error_msg << ": " << result; |
| 198 | } else { |
| 199 | LOG(INFO) << "Moved bad debug tuple cache file from " << file_path << " to " |
| 200 | << new_path; |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | // Move the debug dump cache after verification. |
| 205 | // If the verification passed, we clear the cache file. |
no test coverage detected