summaryrefslogtreecommitdiffstats
path: root/src/network/Network.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-07-24 16:52:24 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-07-24 16:52:24 +0200
commit6a00886804c53883d919f008f6ec47a574d86607 (patch)
tree2dbe9fdb0a0d5f068770d49a3c960d36958f27d5 /src/network/Network.cpp
parent2017-07-21 (diff)
downloadAltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.gz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.bz2
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.lz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.xz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.zst
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.zip
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() {