diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-11-30 21:56:37 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-11-30 21:56:37 +0000 |
commit | 75c9833730a94585b190d2bc4414bf6f54e2f9f2 (patch) | |
tree | 9df838169ac0ddfd5e0b09339b0a0aa45a90c940 | |
parent | a2d7aadb6a42dc45cdf3d5547025dd55c0bd9b17 (diff) |
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".
-rw-r--r-- | lib/common/FileStream.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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) } } |