diff options
author | Reinhard Tartler <siretart@tauware.de> | 2008-01-19 15:08:54 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2008-01-19 15:08:54 +0100 |
commit | 2733267954e91e394fbb512ea3abb4c497c0752f (patch) | |
tree | d6cdebd8776bceba06a2fb5e4ed06a4744bc1b57 /lib/common/Configuration.cpp | |
parent | 1d56581c644c53f1b9a182c6574bc2fc5243d4d1 (diff) |
import version 0.11rc1
This commit has been made by 'bzr import'. I used the upstream tarball
of Version 0.11rc1 for creating it. It has the md5sum:
75608d8bb72dff9a556850ccd0ae8cb9
Diffstat (limited to 'lib/common/Configuration.cpp')
-rw-r--r-- | lib/common/Configuration.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/common/Configuration.cpp b/lib/common/Configuration.cpp index a766434d..3ac0a354 100644 --- a/lib/common/Configuration.cpp +++ b/lib/common/Configuration.cpp @@ -1,4 +1,4 @@ -// distribution boxbackup-0.10 (svn version: 494) +// distribution boxbackup-0.11rc1 (svn version: 2023_2024) // // Copyright (c) 2003 - 2006 // Ben Summers and contributors. All rights reserved. @@ -121,19 +121,16 @@ Configuration::~Configuration() // Created: 2003/07/23 // // -------------------------------------------------------------------------- -std::auto_ptr<Configuration> Configuration::LoadAndVerify(const char *Filename, const ConfigurationVerify *pVerify, std::string &rErrorMsg) +std::auto_ptr<Configuration> Configuration::LoadAndVerify( + const std::string& rFilename, + const ConfigurationVerify *pVerify, + std::string &rErrorMsg) { - // Check arguments - if(Filename == 0) - { - THROW_EXCEPTION(CommonException, BadArguments) - } - // Just to make sure rErrorMsg.erase(); // Open the file - FileHandleGuard<O_RDONLY> file(Filename); + FileHandleGuard<O_RDONLY> file(rFilename); // GetLine object FdGetLine getline(file); @@ -360,6 +357,7 @@ const std::string &Configuration::GetKeyValue(const char *pKeyName) const if(i == mKeys.end()) { + BOX_ERROR("Missing configuration key: " << pKeyName); THROW_EXCEPTION(CommonException, ConfigNoKey) } else |