fix(network): Let module fail silently

The network module should not terminate the
application on failure

Closes jaagr/lemonbuddy#81
This commit is contained in:
Michael Carlberg 2016-10-14 10:48:22 +02:00
parent fcd30c5320
commit 6f286055c5

View File

@ -65,15 +65,10 @@ namespace modules {
} }
// Get an intstance of the network interface // Get an intstance of the network interface
try { if (net::is_wireless_interface(m_interface)) {
if (net::is_wireless_interface(m_interface)) { m_wireless_network = make_unique<net::wireless_network>(m_interface);
m_wireless_network = make_unique<net::wireless_network>(m_interface); } else {
} else { m_wired_network = make_unique<net::wired_network>(m_interface);
m_wired_network = make_unique<net::wired_network>(m_interface);
}
} catch (net::network_error& e) {
m_log.err("%s: %s", name(), e.what());
std::exit(EXIT_FAILURE);
} }
} }