diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-01-12 00:13:48 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-01-12 00:13:48 +0000 |
commit | 09dfee548aac55ed51c752550fb034747dc13c67 (patch) | |
tree | 08c2595afcbbcf3f580b3a385672298066a6151a /lib/backupstore/BackupStoreInfo.cpp | |
parent | afbf1bc7b1277ebfd02a7e70e93a5e27a32e47da (diff) |
Improve messages on failure to load store info.
Diffstat (limited to 'lib/backupstore/BackupStoreInfo.cpp')
-rw-r--r-- | lib/backupstore/BackupStoreInfo.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/backupstore/BackupStoreInfo.cpp b/lib/backupstore/BackupStoreInfo.cpp index 481e97c5..f0448cf8 100644 --- a/lib/backupstore/BackupStoreInfo.cpp +++ b/lib/backupstore/BackupStoreInfo.cpp @@ -190,15 +190,15 @@ std::auto_ptr<BackupStoreInfo> BackupStoreInfo::Load(int32_t AccountID, const st if(!rf->ReadFullBuffer(&hdr, sizeof(hdr), 0 /* not interested in bytes read if this fails */)) { - THROW_EXCEPTION(BackupStoreException, - CouldNotLoadStoreInfo) + THROW_FILE_ERROR("Failed to read store info header", + fn, BackupStoreException, CouldNotLoadStoreInfo); } // Check it if((int32_t)ntohl(hdr.mAccountID) != AccountID) { - THROW_EXCEPTION(BackupStoreException, - BadStoreInfoOnLoad) + THROW_FILE_ERROR("Found wrong account ID in store info", + fn, BackupStoreException, BadStoreInfoOnLoad); } // Insert info from file @@ -223,8 +223,8 @@ std::auto_ptr<BackupStoreInfo> BackupStoreInfo::Load(int32_t AccountID, const st archive.Read(FileAccountID); if (FileAccountID != AccountID) { - THROW_EXCEPTION(BackupStoreException, - BadStoreInfoOnLoad) + THROW_FILE_ERROR("Found wrong account ID in store info", + fn, BackupStoreException, BadStoreInfoOnLoad); } archive.Read(info->mAccountName); |