summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-01-16 00:12:05 +0000
committerChris Wilson <chris+github@qwirx.com>2007-01-16 00:12:05 +0000
commitabe09d202e16b8a168be63de3c1fc6818066288d (patch)
treed905371d5e7776eca78cbac280fb477316c9d5bf /bin
parentf8254ace970d5d922716bc3fa0a5049c57023ce7 (diff)
Log AccessDenied errors in a more concise form than general exceptions
(refs #3)
Diffstat (limited to 'bin')
-rw-r--r--bin/bbackupd/BackupDaemon.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/bin/bbackupd/BackupDaemon.h b/bin/bbackupd/BackupDaemon.h
index 5e3728d0..cf812001 100644
--- a/bin/bbackupd/BackupDaemon.h
+++ b/bin/bbackupd/BackupDaemon.h
@@ -287,10 +287,19 @@ public:
const std::string& rLocalPath,
const BoxException& rException)
{
- BOX_ERROR("Failed to upload file: " << rLocalPath
- << ": caught exception: " << rException.what()
- << " (" << rException.GetType()
- << "/" << rException.GetSubType() << ")");
+ if (rException.GetType() == CommonException::ExceptionType &&
+ rException.GetSubType() == CommonException::AccessDenied)
+ {
+ BOX_ERROR("Failed to upload file: " << rLocalPath
+ << ": Access denied");
+ }
+ else
+ {
+ BOX_ERROR("Failed to upload file: " << rLocalPath
+ << ": caught exception: " << rException.what()
+ << " (" << rException.GetType()
+ << "/" << rException.GetSubType() << ")");
+ }
}
virtual void NotifyFileUploading(
const BackupClientDirectoryRecord* pDirRecord,