[Box Backup-commit] COMMIT r1600 - box/chris/merge/bin/bbackupquery

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Apr 28 21:43:48 BST 2007


Author: chris
Date: 2007-04-28 21:43:48 +0100 (Sat, 28 Apr 2007)
New Revision: 1600

Modified:
   box/chris/merge/bin/bbackupquery/BackupQueries.cpp
Log:
Improve error messages when compare throws an exception. (refs #3)


Modified: box/chris/merge/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/merge/bin/bbackupquery/BackupQueries.cpp	2007-04-28 20:42:45 UTC (rev 1599)
+++ box/chris/merge/bin/bbackupquery/BackupQueries.cpp	2007-04-28 20:43:48 UTC (rev 1600)
@@ -1715,15 +1715,27 @@
 				}
 				catch(BoxException &e)
 				{
-					printf("ERROR: (%d/%d) during file fetch and comparison for '%s'\n",
-						e.GetType(),
-						e.GetSubType(),
-						storePathDisplay.c_str());
+					BOX_ERROR("Failed to fetch and compare "
+						"'" << 
+						storePathDisplay.c_str() <<
+						"': error " << e.what() <<
+						" (" << e.GetType() <<
+						"/"  << e.GetSubType() << ")");
 					rParams.mUncheckedFiles ++;
 				}
+				catch(std::exception &e)
+				{
+					BOX_ERROR("Failed to fetch and compare "
+						"'" << 
+						storePathDisplay.c_str() <<
+						"': " << e.what());
+				}
 				catch(...)
 				{	
-					printf("ERROR: (unknown) during file fetch and comparison for '%s'\n", storePathDisplay.c_str());
+					BOX_ERROR("Failed to fetch and compare "
+						"'" << 
+						storePathDisplay.c_str() <<
+						"': unknown error");
 					rParams.mUncheckedFiles ++;
 				}
 




More information about the Boxbackup-commit mailing list