diff --git a/tsl/platform/path.cc b/tsl/platform/path.cc index e251972c7..65c1405a0 100644 --- a/tsl/platform/path.cc +++ b/tsl/platform/path.cc @@ -20,6 +20,8 @@ limitations under the License. #include #include #include + +#include #if defined(PLATFORM_WINDOWS) #include #else @@ -338,7 +340,8 @@ string GetTempFilename(const string& extension) { fd = mkstemp(&tmp_filepath[0]); } if (fd < 0) { - LOG(FATAL) << "Failed to create temp file."; + LOG(FATAL) << "Failed to create temp file " << tmp_filepath // Crash OK + << ", error: " << strerror(errno); } else { if (close(fd) < 0) { LOG(ERROR) << "close() failed: " << strerror(errno);