diff options
Diffstat (limited to 'src/cli/tls_server.cpp')
-rw-r--r-- | src/cli/tls_server.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cli/tls_server.cpp b/src/cli/tls_server.cpp index 6a5b4e812..f6a3a311e 100644 --- a/src/cli/tls_server.cpp +++ b/src/cli/tls_server.cpp @@ -79,10 +79,10 @@ class TLS_Server : public Command if(::recvfrom(server_fd, nullptr, 0, MSG_PEEK, (struct sockaddr*)&from, &from_len) != 0) - throw std::runtime_error("Could not peek next packet"); + throw CLI_Error("Could not peek next packet"); if(::connect(server_fd, (struct sockaddr*)&from, from_len) != 0) - throw std::runtime_error("Could not connect UDP socket"); + throw CLI_Error("Could not connect UDP socket"); fd = server_fd; } @@ -161,7 +161,7 @@ class TLS_Server : public Command int fd = ::socket(PF_INET, type, 0); if(fd == -1) - throw std::runtime_error("Unable to acquire socket"); + throw CLI_Error("Unable to acquire socket"); sockaddr_in socket_info; ::memset(&socket_info, 0, sizeof(socket_info)); @@ -174,7 +174,7 @@ class TLS_Server : public Command if(::bind(fd, (sockaddr*)&socket_info, sizeof(struct sockaddr)) != 0) { ::close(fd); - throw std::runtime_error("server bind failed"); + throw CLI_Error("server bind failed"); } if(is_tcp) @@ -182,7 +182,7 @@ class TLS_Server : public Command if(::listen(fd, 100) != 0) { ::close(fd); - throw std::runtime_error("listen failed"); + throw CLI_Error("listen failed"); } } @@ -224,7 +224,7 @@ class TLS_Server : public Command if(errno == EINTR) sent = 0; else - throw std::runtime_error("Socket write failed"); + throw CLI_Error("Socket write failed"); } buf += sent; |