diff options
Diffstat (limited to '')
-rw-r--r-- | src/network/Network.cpp | 8 | ||||
-rw-r--r-- | src/network/Network.hpp (renamed from include/network/Network.hpp) | 0 | ||||
-rw-r--r-- | src/network/NetworkClient.hpp (renamed from include/network/NetworkClient.hpp) | 0 | ||||
-rw-r--r-- | src/network/Packet.hpp (renamed from include/network/Packet.hpp) | 0 | ||||
-rw-r--r-- | src/network/Socket.hpp (renamed from include/network/Socket.hpp) | 0 | ||||
-rw-r--r-- | src/network/Stream.hpp (renamed from include/network/Stream.hpp) | 0 |
6 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() { diff --git a/include/network/Network.hpp b/src/network/Network.hpp index 1281289..1281289 100644 --- a/include/network/Network.hpp +++ b/src/network/Network.hpp diff --git a/include/network/NetworkClient.hpp b/src/network/NetworkClient.hpp index 22b1b22..22b1b22 100644 --- a/include/network/NetworkClient.hpp +++ b/src/network/NetworkClient.hpp diff --git a/include/network/Packet.hpp b/src/network/Packet.hpp index 685e3da..685e3da 100644 --- a/include/network/Packet.hpp +++ b/src/network/Packet.hpp diff --git a/include/network/Socket.hpp b/src/network/Socket.hpp index 48bcad9..48bcad9 100644 --- a/include/network/Socket.hpp +++ b/src/network/Socket.hpp diff --git a/include/network/Stream.hpp b/src/network/Stream.hpp index a24dfbe..a24dfbe 100644 --- a/include/network/Stream.hpp +++ b/src/network/Stream.hpp |