Skip to content

Commit

Permalink
Handle only addons exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
hrubymar10 committed Feb 23, 2019
1 parent 2dae665 commit 9070a32
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/gui/dialogs/multiplayer/lobby.cpp
Expand Up @@ -36,6 +36,7 @@
#include "gui/widgets/toggle_panel.hpp"
#include "gui/widgets/tree_view_node.hpp"

#include "addon/client.hpp"
#include "addon/manager_ui.hpp"
#include "chat_log.hpp"
#include "font/text_formatting.hpp"
Expand Down Expand Up @@ -244,7 +245,13 @@ bool handle_addon_requirements_gui(const std::vector<mp::game_info::required_add
// Begin download session
try {
return ad_hoc_addon_fetch_session(needs_download);
} catch (const std::exception& ex) {
} catch (const addons_client::invalid_server_address& ex) {
ERR_LB << "Caught an exception: " << ex.what() << "\n";
} catch (const addons_client::not_connected_to_server& ex) {
ERR_LB << "Caught an exception: " << ex.what() << "\n";
} catch (const addons_client::user_exit& ex) {
ERR_LB << "Caught an exception: " << ex.what() << "\n";
} catch (const addons_client::user_disconnect& ex) {
ERR_LB << "Caught an exception: " << ex.what() << "\n";
}
}
Expand Down

0 comments on commit 9070a32

Please sign in to comment.