diff options
Diffstat (limited to 'src/Net/ClientConnection.cpp')
-rw-r--r-- | src/Net/ClientConnection.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Net/ClientConnection.cpp b/src/Net/ClientConnection.cpp index 695cba5..5c602e1 100644 --- a/src/Net/ClientConnection.cpp +++ b/src/Net/ClientConnection.cpp @@ -52,7 +52,7 @@ void ClientConnection::connectionHeader() { rawReceive(sizeof(ConnectionHeader), sigc::mem_fun(this, &ClientConnection::connectionHeaderReceiveHandler)); } -void ClientConnection::connect(const IPAddress &address, bool daemon0) throw(ConnectionException) { +void ClientConnection::connect(const IPAddress &address, bool daemon0) throw(Common::Exception) { daemon = daemon0; if(isConnected()) @@ -61,7 +61,7 @@ void ClientConnection::connect(const IPAddress &address, bool daemon0) throw(Con sock = socket(PF_INET, SOCK_STREAM, 0); if(sock < 0) - throw ConnectionException("socket()", std::strerror(errno)); + throw Common::Exception("socket()", Common::Exception::INTERNAL_ERRNO, errno); if(peer) delete peer; @@ -73,7 +73,7 @@ void ClientConnection::connect(const IPAddress &address, bool daemon0) throw(Con close(sock); delete peer; peer = 0; - throw ConnectionException("connect()", std::strerror(errno)); + throw Common::Exception("connect()", Common::Exception::INTERNAL_ERRNO, errno); } // Set non-blocking flag @@ -82,7 +82,7 @@ void ClientConnection::connect(const IPAddress &address, bool daemon0) throw(Con if(flags < 0) { close(sock); - throw ConnectionException("fcntl()", std::strerror(errno)); + throw Common::Exception("fcntl()", Common::Exception::INTERNAL_ERRNO, errno); } fcntl(sock, F_SETFL, flags | O_NONBLOCK); |