diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-01-16 00:12:05 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-01-16 00:12:05 +0000 |
commit | abe09d202e16b8a168be63de3c1fc6818066288d (patch) | |
tree | d905371d5e7776eca78cbac280fb477316c9d5bf /bin/bbackupd/BackupDaemon.h | |
parent | f8254ace970d5d922716bc3fa0a5049c57023ce7 (diff) |
Log AccessDenied errors in a more concise form than general exceptions
(refs #3)
Diffstat (limited to 'bin/bbackupd/BackupDaemon.h')
-rw-r--r-- | bin/bbackupd/BackupDaemon.h | 17 |
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, |