Fix -Wcatch-value for GCC 8

This commit is contained in:
Sude 2018-05-14 12:29:51 +03:00
parent 8ca7722853
commit 7373d357aa
2 changed files with 5 additions and 5 deletions

View File

@ -196,7 +196,7 @@ int API::getUserDetails()
Json::Value root;
std::istringstream json_stream(json);
try {
json_stream >> root;
} catch (const Json::Exception& exc) {
@ -307,7 +307,7 @@ gameDetails API::getGameDetails(const std::string& game_name, const unsigned int
try {
json_stream >> root;
} catch (Json::Exception exc) {
} catch (Json::Exception& exc) {
#ifdef DEBUG
std::cerr << "DEBUG INFO (API::getGameDetails)" << std::endl << json << std::endl;
#endif
@ -322,7 +322,7 @@ gameDetails API::getGameDetails(const std::string& game_name, const unsigned int
game.title = root["game"]["title"].asString();
game.icon = root["game"]["icon"].asString();
std::vector<std::string> membernames = root["game"].getMemberNames();
// Installer details
// Create a list of installers from JSON
std::vector<gameFileInfo> installers;

View File

@ -290,7 +290,7 @@ std::vector<gameItem> Website::getFreeGames()
std::cout << exc.what();
exit(1);
}
#ifdef DEBUG
std::cerr << "DEBUG INFO (Website::getFreeGames)" << std::endl << root << std::endl;
#endif
@ -617,7 +617,7 @@ std::vector<wishlistItem> Website::getWishlistItems()
try {
// Parse JSON
response_stream >> root;
} catch(const Json::Exception exc) {
} catch(const Json::Exception& exc) {
#ifdef DEBUG
std::cerr << "DEBUG INFO (Website::getWishlistItems)" << std::endl << response << std::endl;
#endif