From 6f286055c5ff649e1d08d7b423fbd0b68360c7fc Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Fri, 14 Oct 2016 10:48:22 +0200 Subject: [PATCH] fix(network): Let module fail silently The network module should not terminate the application on failure Closes jaagr/lemonbuddy#81 --- include/modules/network.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/include/modules/network.hpp b/include/modules/network.hpp index 54a12c94..679e4590 100644 --- a/include/modules/network.hpp +++ b/include/modules/network.hpp @@ -65,15 +65,10 @@ namespace modules { } // Get an intstance of the network interface - try { - if (net::is_wireless_interface(m_interface)) { - m_wireless_network = make_unique(m_interface); - } else { - m_wired_network = make_unique(m_interface); - } - } catch (net::network_error& e) { - m_log.err("%s: %s", name(), e.what()); - std::exit(EXIT_FAILURE); + if (net::is_wireless_interface(m_interface)) { + m_wireless_network = make_unique(m_interface); + } else { + m_wired_network = make_unique(m_interface); } }