[Box Backup-commit] COMMIT r2391 - box/trunk/lib/common

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Sun Nov 30 22:00:24 GMT 2008


Author: chris
Date: 2008-11-30 22:00:23 +0000 (Sun, 30 Nov 2008)
New Revision: 2391

Modified:
   box/trunk/lib/common/FileStream.cpp
   box/trunk/lib/common/Logging.h
Log:
Compile fix and log the error number recorded by winerrno, not
the "last" error, whatever that was.


Modified: box/trunk/lib/common/FileStream.cpp
===================================================================
--- box/trunk/lib/common/FileStream.cpp	2008-11-30 21:56:37 UTC (rev 2390)
+++ box/trunk/lib/common/FileStream.cpp	2008-11-30 22:00:23 UTC (rev 2391)
@@ -74,8 +74,8 @@
 		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);

Modified: box/trunk/lib/common/Logging.h
===================================================================
--- box/trunk/lib/common/Logging.h	2008-11-30 21:56:37 UTC (rev 2390)
+++ box/trunk/lib/common/Logging.h	2008-11-30 22:00:23 UTC (rev 2391)
@@ -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) \




More information about the Boxbackup-commit mailing list