From 02bf6ca2f7b413c453e5673cc951051794fd4bd1 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 bd636b2c..b1eeb465 100644 --- a/AnnService/inc/Helper/AsyncFileReader.h +++ b/AnnService/inc/Helper/AsyncFileReader.h @@ -522,7 +522,7 @@ namespace SPTAG { m_fileHandle = open(filePath, O_RDONLY | O_DIRECT); if (m_fileHandle <= 0) { - SPTAGLIB_LOG(LogLevel::LL_Error, "Failed to create file handle: %s\n", filePath); + SPTAGLIB_LOG(LogLevel::LL_Error, "Failed to create file handle: %s: %s\n", filePath, strerror(errno)); return false; }