summaryrefslogtreecommitdiff
path: root/bin/bbackupquery
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-04-28 20:43:48 +0000
committerChris Wilson <chris+github@qwirx.com>2007-04-28 20:43:48 +0000
commita04092e0dfa58849c63b720284cf88437767b890 (patch)
tree4c24e37941c75ad60944ae73707c80160a9fc85c /bin/bbackupquery
parent5939cfae21c84cc587bec541808ae121a3536737 (diff)
Improve error messages when compare throws an exception. (refs #3)
Diffstat (limited to 'bin/bbackupquery')
-rw-r--r--bin/bbackupquery/BackupQueries.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp
index 29108786..e31df624 100644
--- a/bin/bbackupquery/BackupQueries.cpp
+++ b/bin/bbackupquery/BackupQueries.cpp
@@ -1715,15 +1715,27 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir, const s
}
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 ++;
}