diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-19 11:15:14 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-19 11:15:14 +0200 |
commit | 113b1f4bbdecfab24ed9781b730a76a442adad6f (patch) | |
tree | e28f5c9a7a1afebd7d920f1006aacff401894dbc /src/Net/ClientConnection.cpp | |
parent | 793a0789858734141dfa12d2ab3dd6ea3ed293e8 (diff) | |
download | mad-113b1f4bbdecfab24ed9781b730a76a442adad6f.tar mad-113b1f4bbdecfab24ed9781b730a76a442adad6f.zip |
Exceptions vereinheitlicht
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); |