summaryrefslogtreecommitdiffstats
path: root/src/network/Network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/Network.cpp')
-rw-r--r--src/network/Network.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network/Network.cpp b/src/network/Network.cpp
index 91cb481..798756d 100644
--- a/src/network/Network.cpp
+++ b/src/network/Network.cpp
@@ -1,8 +1,12 @@
#include <network/Network.hpp>
Network::Network(std::string address, unsigned short port) {
- socket = new Socket(address, port);
- stream = new StreamSocket(socket);
+ try {
+ socket = new Socket(address, port);
+ stream = new StreamSocket(socket);
+ } catch (std::exception &e) {
+ LOG(FATAL)<<e.what();
+ }
}
Network::~Network() {