From 2aa11a523519bb181e43ccb3351f99b937ca9824 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Sun, 31 Jul 2022 15:18:09 +0800 Subject: [PATCH] Print file open error information Should help diagnose the build failures in Debian. Fixes: https://github.com/microsoft/SPTAG/issues/327 --- AnnService/inc/Helper/AsyncFileReader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AnnService/inc/Helper/AsyncFileReader.h b/AnnService/inc/Helper/AsyncFileReader.h index b4be27727..d8cc593bb 100644 --- a/AnnService/inc/Helper/AsyncFileReader.h +++ b/AnnService/inc/Helper/AsyncFileReader.h @@ -518,7 +518,7 @@ namespace SPTAG { m_fileHandle = open(filePath, O_RDONLY | O_DIRECT); if (m_fileHandle <= 0) { - LOG(LogLevel::LL_Error, "Failed to create file handle: %s\n", filePath); + LOG(LogLevel::LL_Error, "Failed to create file handle: %s: %s\n", filePath, strerror(errno)); return false; }