From 75c9833730a94585b190d2bc4414bf6f54e2f9f2 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 30 Nov 2008 21:56:37 +0000 Subject: Log the Windows error code if openfile() fails on Windows, as the default strerror() seems borked and reports EBUSY (file in use) as"Resource device". --- lib/common/FileStream.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/common/FileStream.cpp') diff --git a/lib/common/FileStream.cpp b/lib/common/FileStream.cpp index 98b654f9..630a1ae5 100644 --- a/lib/common/FileStream.cpp +++ b/lib/common/FileStream.cpp @@ -73,8 +73,13 @@ void FileStream::AfterOpen() } else { + #ifdef WIN32 + BOX_LOG_WIN_WARNING("Failed to open file: " << + mFileName); + #else BOX_LOG_SYS_WARNING("Failed to open file: " << mFileName); + #endif THROW_EXCEPTION(CommonException, OSFileOpenError) } } -- cgit v1.2.3