summaryrefslogtreecommitdiff
path: root/bin/bbackupquery
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-04-28 17:37:37 +0000
committerChris Wilson <chris+github@qwirx.com>2007-04-28 17:37:37 +0000
commit82bea7ee6395af37ff2b6183e4ed49313dcc3539 (patch)
tree171a0ee85f3e94d53487693c403e3d8212e698af /bin/bbackupquery
parent380e62839d18d6817b0a4aeac8e942bbb1e8a213 (diff)
Improve error messages when Getting a file fails with an exception.
(refs #3)
Diffstat (limited to 'bin/bbackupquery')
-rw-r--r--bin/bbackupquery/BackupQueries.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp
index 1e7aebe1..29108786 100644
--- a/bin/bbackupquery/BackupQueries.cpp
+++ b/bin/bbackupquery/BackupQueries.cpp
@@ -47,6 +47,7 @@
#include "ExcludeList.h"
#include "BackupClientMakeExcludeList.h"
#include "PathUtils.h"
+#include "Logging.h"
#include "MemLeakFindOn.h"
@@ -1032,10 +1033,22 @@ void BackupQueries::CommandGet(std::vector<std::string> args, const bool *opts)
// 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");
}
}