summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-08-20 23:41:07 +0000
committerChris Wilson <chris+github@qwirx.com>2006-08-20 23:41:07 +0000
commitb557bd2fa0256ba4cca41d205e7b0b69602f9f18 (patch)
treec3ba9e26307a38ad162d1407cef28f9f6d936abf
parent512d2ccc4a5c512a70ee3464f8f7d894c5435051 (diff)
* bin/bbackupd/BackupDaemon.cpp
- Improved exception messages for reading and writing the StoreObjectInfoFile, and made them consistent.
-rw-r--r--bin/bbackupd/BackupDaemon.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index 9a3035ee..2e80cd2d 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -2333,13 +2333,33 @@ bool BackupDaemon::SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time
::syslog(LOG_INFO, "Saved store object info file '%s'",
StoreObjectInfoFile.c_str());
}
+ catch(std::exception &e)
+ {
+ ::syslog(LOG_ERR, "Internal error writing store object "
+ "info file (%s): %s",
+ StoreObjectInfoFile.c_str(), e.what());
+ }
catch(...)
{
- ::syslog(LOG_WARNING, "Requested store object info file '%s' "
- "not accessible or could not be created",
+ ::syslog(LOG_ERR, "Internal error writing store object "
+ "info file (%s): unknown error",
StoreObjectInfoFile.c_str());
}
+ DeleteAllLocations();
+ catch(std::exception &e)
+ {
+ ::syslog(LOG_WARNING, "Requested store object info file '%s' "
+ "not accessible or could not be created: %s",
+ StoreObjectInfoFile.c_str(), e.what());
+ }
+ catch(...)
+ {
+ ::syslog(LOG_WARNING, "Requested store object info file '%s' "
+ "not accessible or could not be created: "
+ "unknown error", StoreObjectInfoFile.c_str());
+ }
+
return created;
}
@@ -2492,12 +2512,14 @@ bool BackupDaemon::DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_
catch(std::exception &e)
{
::syslog(LOG_ERR, "Internal error reading store object "
- "info file: %s", e.what());
+ "info file (%s): %s",
+ StoreObjectInfoFile.c_str(), e.what());
}
catch(...)
{
::syslog(LOG_ERR, "Internal error reading store object "
- "info file: unknown error");
+ "info file (%s): unknown error",
+ StoreObjectInfoFile.c_str());
}
DeleteAllLocations();