diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-11-30 22:00:23 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-11-30 22:00:23 +0000 |
commit | 4584e25170424be8b0f9cae7012def007619b514 (patch) | |
tree | 861599599a727bff3f58d8da738705be47245e16 /lib | |
parent | 75c9833730a94585b190d2bc4414bf6f54e2f9f2 (diff) |
Compile fix and log the error number recorded by winerrno, not
the "last" error, whatever that was.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/FileStream.cpp | 4 | ||||
-rw-r--r-- | lib/common/Logging.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/common/FileStream.cpp b/lib/common/FileStream.cpp index 630a1ae5..3e3ace3f 100644 --- a/lib/common/FileStream.cpp +++ b/lib/common/FileStream.cpp @@ -74,8 +74,8 @@ void FileStream::AfterOpen() else { #ifdef WIN32 - BOX_LOG_WIN_WARNING("Failed to open file: " << - mFileName); + BOX_LOG_WIN_WARNING_NUMBER("Failed to open file: " << + mFileName, winerrno); #else BOX_LOG_SYS_WARNING("Failed to open file: " << mFileName); diff --git a/lib/common/Logging.h b/lib/common/Logging.h index 39e76740..0f4ba151 100644 --- a/lib/common/Logging.h +++ b/lib/common/Logging.h @@ -61,8 +61,12 @@ #ifdef WIN32 #define BOX_LOG_WIN_ERROR(stuff) \ BOX_ERROR(stuff << ": " << GetErrorMessage(GetLastError())) + #define BOX_LOG_WIN_WARNING(stuff) \ + BOX_WARNING(stuff << ": " << GetErrorMessage(GetLastError())) #define BOX_LOG_WIN_ERROR_NUMBER(stuff, number) \ BOX_ERROR(stuff << ": " << GetErrorMessage(number)) + #define BOX_LOG_WIN_WARNING_NUMBER(stuff, number) \ + BOX_WARNING(stuff << ": " << GetErrorMessage(number)) #endif #define BOX_FORMAT_HEX32(number) \ |