diff options
-rw-r--r-- | bin/bbackupquery/BackupQueries.cpp | 15 |
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"); } } |