[Box Backup-commit] COMMIT r2849 - box/trunk/lib/backupstore

subversion at boxbackup.org subversion at boxbackup.org
Wed Jan 12 00:13:48 GMT 2011


Author: chris
Date: 2011-01-12 00:13:48 +0000 (Wed, 12 Jan 2011)
New Revision: 2849

Modified:
   box/trunk/lib/backupstore/BackupStoreInfo.cpp
Log:
Improve messages on failure to load store info.


Modified: box/trunk/lib/backupstore/BackupStoreInfo.cpp
===================================================================
--- box/trunk/lib/backupstore/BackupStoreInfo.cpp	2011-01-12 00:13:11 UTC (rev 2848)
+++ box/trunk/lib/backupstore/BackupStoreInfo.cpp	2011-01-12 00:13:48 UTC (rev 2849)
@@ -190,15 +190,15 @@
 		if(!rf->ReadFullBuffer(&hdr, sizeof(hdr),
 			0 /* not interested in bytes read if this fails */))
 		{
-			THROW_EXCEPTION(BackupStoreException,
-				CouldNotLoadStoreInfo)
+			THROW_FILE_ERROR("Failed to read store info header",
+				fn, BackupStoreException, CouldNotLoadStoreInfo);
 		}
 		
 		// Check it
 		if((int32_t)ntohl(hdr.mAccountID) != AccountID)
 		{
-			THROW_EXCEPTION(BackupStoreException,
-				BadStoreInfoOnLoad)
+			THROW_FILE_ERROR("Found wrong account ID in store info",
+				fn, BackupStoreException, BadStoreInfoOnLoad);
 		}
 		
 		// Insert info from file
@@ -223,8 +223,8 @@
 		archive.Read(FileAccountID);
 		if (FileAccountID != AccountID)
 		{
-			THROW_EXCEPTION(BackupStoreException,
-				BadStoreInfoOnLoad)
+			THROW_FILE_ERROR("Found wrong account ID in store info",
+				fn, BackupStoreException, BadStoreInfoOnLoad);
 		}
 
 		archive.Read(info->mAccountName);




More information about the Boxbackup-commit mailing list