summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-11-30 21:56:37 +0000
committerChris Wilson <chris+github@qwirx.com>2008-11-30 21:56:37 +0000
commit75c9833730a94585b190d2bc4414bf6f54e2f9f2 (patch)
tree9df838169ac0ddfd5e0b09339b0a0aa45a90c940
parenta2d7aadb6a42dc45cdf3d5547025dd55c0bd9b17 (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.cpp5
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)
}
}