diff options
author | randomdan <randomdan@localhost> | 2011-02-16 16:09:32 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-02-16 16:09:32 +0000 |
commit | fceb7a7b04de5c91adcd041c87642dc11c1a0fd4 (patch) | |
tree | de350f7b05dd7b6ce2e97ee44443452ccfa77b3d /project2/config.cpp | |
parent | Tidied up XML loader using boost::multi_index (diff) | |
download | project2-fceb7a7b04de5c91adcd041c87642dc11c1a0fd4.tar.bz2 project2-fceb7a7b04de5c91adcd041c87642dc11c1a0fd4.tar.xz project2-fceb7a7b04de5c91adcd041c87642dc11c1a0fd4.zip |
Make CurlHandle throw an exception on failure
Improve error messages almost everywhere
Allow setting of platform through the options system
Allow specifying query params on the console
Fix file stream writer's string support for strings containing multibyte chars
Diffstat (limited to 'project2/config.cpp')
-rw-r--r-- | project2/config.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/project2/config.cpp b/project2/config.cpp index f973c05..c3823ff 100644 --- a/project2/config.cpp +++ b/project2/config.cpp @@ -5,8 +5,8 @@ #include <libxml/xinclude.h> #include <libxml++/parsers/domparser.h> -class NoSuchPlatform : public std::exception { }; -class NoSuchConfigurationValue : public std::exception { }; +SimpleMessageException(NoSuchPlatform); +SimpleMessageException(NoSuchConfigurationValue); Configuration::Configuration(const Glib::ustring & ek) : loaded(false), @@ -53,7 +53,7 @@ Configuration::getCurrentConfig() const Glib::ustring platformName(resolveCurrentConfig()); Platforms::const_iterator i = platforms.find(platformName); if (i == platforms.end()) { - throw NoSuchPlatform(); + throw NoSuchPlatform(platformName); } return i->second; } @@ -63,7 +63,7 @@ Configuration::Platform::getValue(const Glib::ustring & key) const { Values::const_iterator i = values.find(key); if (i == values.end()) { - throw NoSuchConfigurationValue(); + throw NoSuchConfigurationValue(key); } return i->second; } |