Catch all exceptions when deciding whether to load the default config.

Originally committed to SVN as r5136.
This commit is contained in:
Amar Takhar 2011-01-08 12:13:24 +00:00
parent 0d7b2c6e76
commit 319ac2d4bb
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ Hotkey::Hotkey(const std::string &file, const std::string &default_config):
json::UnknownElement hotkey_root;
try {
hotkey_root = agi::json_util::parse(stream);
} catch (json::Reader::ParseException& e) {
} catch (...) {
// There's definatly a better way to do this.
std::istringstream *stream = new std::istringstream(config_default);
hotkey_root = agi::json_util::parse(stream);