From 319ac2d4bb4224a3d7fa307b7b9d21910978a27a Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sat, 8 Jan 2011 12:13:24 +0000 Subject: [PATCH] Catch all exceptions when deciding whether to load the default config. Originally committed to SVN as r5136. --- aegisub/libaegisub/common/hotkey.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/libaegisub/common/hotkey.cpp b/aegisub/libaegisub/common/hotkey.cpp index d9a87bb85..737eb59d8 100644 --- a/aegisub/libaegisub/common/hotkey.cpp +++ b/aegisub/libaegisub/common/hotkey.cpp @@ -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);