summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOssama Othman <ossama.othman@intel.com>2013-10-08 08:04:14 -0700
committerOssama Othman <ossama.othman@intel.com>2013-10-08 09:41:32 -0700
commit907afa4a9b95b1005ea60088f0fd0376a23aa532 (patch)
tree1af8a697a890fc3d930151407d35782f670a4681 /lib
parent6bc8120b12fc2eff49679e3d18a9ae3054aa8399 (diff)
downloadsettings-daemon-907afa4a9b95b1005ea60088f0fd0376a23aa532.tar.gz
settings-daemon-907afa4a9b95b1005ea60088f0fd0376a23aa532.tar.bz2
settings-daemon-907afa4a9b95b1005ea60088f0fd0376a23aa532.zip
Do not continue with initialization if no plugins are found.
Change-Id: I1cbb55628e0e6253920519384d16c04384abb6d7 Signed-off-by: Ossama Othman <ossama.othman@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/manager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/manager.cpp b/lib/manager.cpp
index 8fd64b0..2a29575 100644
--- a/lib/manager.cpp
+++ b/lib/manager.cpp
@@ -67,7 +67,8 @@ void
ivi::settings::manager::load_settings(std::string const & dir)
{
if (dir.length() == 0)
- throw std::logic_error("Zero length settings plugin directory path.");
+ throw std::runtime_error("Zero length settings plugin "
+ "directory path.");
namespace fs = boost::filesystem;
@@ -111,16 +112,16 @@ ivi::settings::manager::load_settings(std::string const & dir)
}
if (settings_.size() == 0) {
- std::cerr << "Settings plugin directory \""
- << dir << "\" has no plugins.\n";
+ throw std::runtime_error("Settings plugin directory \""
+ + dir + "\" has no plugins.");
} else {
std::cerr << "Registered settings plugins: \n";
for (auto const & i : settings_)
std::cerr << "\t" << i.first << '\n';
}
} else {
- std::cerr << "Settings plugin directory \""
- << dir << "\" does not exist.\n";
+ throw std::runtime_error("Settings plugin directory \""
+ + dir + "\" does not exist.");
}
}