[Box Backup-commit] COMMIT r1597 - box/chris/merge/bin/bbackupquery
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sat, 28 Apr 2007 18:37:37 +0100
Author: chris
Date: 2007-04-28 18:37:37 +0100 (Sat, 28 Apr 2007)
New Revision: 1597
Modified:
box/chris/merge/bin/bbackupquery/BackupQueries.cpp
Log:
Improve error messages when Getting a file fails with an exception.
(refs #3)
Modified: box/chris/merge/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/merge/bin/bbackupquery/BackupQueries.cpp 2007-04-28 17:37:01 UTC (rev 1596)
+++ box/chris/merge/bin/bbackupquery/BackupQueries.cpp 2007-04-28 17:37:37 UTC (rev 1597)
@@ -47,6 +47,7 @@
#include "ExcludeList.h"
#include "BackupClientMakeExcludeList.h"
#include "PathUtils.h"
+#include "Logging.h"
#include "MemLeakFindOn.h"
@@ -1032,10 +1033,22 @@
// Done.
printf("Object ID %08llx fetched sucessfully.\n", fileId);
}
+ catch (BoxException &e)
+ {
+ BOX_ERROR("Failed to fetch file: " <<
+ e.what());
+ ::unlink(localName.c_str());
+ }
+ catch(std::exception &e)
+ {
+ BOX_ERROR("Failed to fetch file: " <<
+ e.what());
+ ::unlink(localName.c_str());
+ }
catch(...)
{
+ BOX_ERROR("Failed to fetch file: unknown error");
::unlink(localName.c_str());
- printf("Error occured fetching file.\n");
}
}