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

subversion at boxbackup.org subversion at boxbackup.org
Wed Apr 9 23:15:42 BST 2014


Author: chris
Date: 2014-04-09 23:15:42 +0100 (Wed, 09 Apr 2014)
New Revision: 3321

Modified:
   box/trunk/lib/common/Guards.h
Log:
Improve error messages when FileHandleGuard fails to open a file.

Use the standard macros to report file error messages in the standard
format, including a filename and message in the exception.

Modified: box/trunk/lib/common/Guards.h
===================================================================
--- box/trunk/lib/common/Guards.h	2014-04-09 22:15:39 UTC (rev 3320)
+++ box/trunk/lib/common/Guards.h	2014-04-09 22:15:42 UTC (rev 3321)
@@ -37,9 +37,8 @@
 	{
 		if(mOSFileHandle < 0)
 		{
-			BOX_LOG_SYS_ERROR("FileHandleGuard: failed to open " 
-				"file '" << rFilename << "'");
-			THROW_EXCEPTION(CommonException, OSFileOpenError)
+			THROW_SYS_FILE_ERROR("Failed to open file", rFilename,
+				CommonException, OSFileOpenError);
 		}
 	}
 	




More information about the Boxbackup-commit mailing list