[Box Backup-commit] COMMIT r3400 - in box/trunk: bin/bbackupd lib/server

subversion at boxbackup.org subversion at boxbackup.org
Thu Sep 18 21:28:16 BST 2014


Author: chris
Date: 2014-09-18 21:28:15 +0100 (Thu, 18 Sep 2014)
New Revision: 3400

Modified:
   box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h
   box/trunk/lib/server/Daemon.cpp
Log:
Improve exception message if a Daemon is used without being configured first

Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h
===================================================================
--- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h	2014-09-04 01:37:00 UTC (rev 3399)
+++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h	2014-09-18 20:28:15 UTC (rev 3400)
@@ -152,7 +152,9 @@
 	void UpdateAttributes(SyncParams &rParams,
 		BackupStoreDirectory *pDirOnStore,
 		const std::string &rLocalPath);
-	bool UpdateItems(SyncParams &rParams, const std::string &rLocalPath,
+protected: // to allow tests to hook in before UpdateItems() runs
+	virtual bool UpdateItems(SyncParams &rParams,
+		const std::string &rLocalPath,
 		const std::string &rRemotePath,
 		const Location& rBackupLocation,
 		BackupStoreDirectory *pDirOnStore,
@@ -159,6 +161,7 @@
 		std::vector<BackupStoreDirectory::Entry *> &rEntriesLeftOver,
 		std::vector<std::string> &rFiles,
 		const std::vector<std::string> &rDirs);
+private:
 	int64_t CreateRemoteDir(const std::string& localDirPath,
 		const std::string& nonVssDirPath,
 		const std::string& remoteDirPath,

Modified: box/trunk/lib/server/Daemon.cpp
===================================================================
--- box/trunk/lib/server/Daemon.cpp	2014-09-04 01:37:00 UTC (rev 3399)
+++ box/trunk/lib/server/Daemon.cpp	2014-09-18 20:28:15 UTC (rev 3400)
@@ -887,7 +887,9 @@
 	if(mapConfiguration.get() == 0)
 	{
 		// Shouldn't get anywhere near this if a configuration file can't be loaded
-		THROW_EXCEPTION(ServerException, Internal)
+		THROW_EXCEPTION_MESSAGE(ServerException, Internal,
+			"The daemon has not been configured; no config file "
+			"has been loaded.");
 	}
 	
 	return *mapConfiguration;




More information about the Boxbackup-commit mailing list