diff options
Diffstat (limited to 'http.cpp')
-rw-r--r-- | http.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -6,6 +6,8 @@ #include "response.h" #include "websocket.h" +#include <fmt/core.h> + #include <openssl/ssl.h> #include <openssl/crypto.h> @@ -326,7 +328,8 @@ public: acceptor_.open(endpoint.protocol(), ec); if (ec) { - fail(ec, "http listener open"); + //fail(ec, "http listener open"); + throw std::runtime_error(fmt::format("http listener open unsuccessful: {}:{}", endpoint.address().to_string(), endpoint.port())); return; } @@ -342,7 +345,8 @@ public: acceptor_.bind(endpoint, ec); if (ec) { - fail(ec, "http listener bind"); + //fail(ec, "http listener bind"); + throw std::runtime_error(fmt::format("http listener bind unsuccessful: {}:{}", endpoint.address().to_string(), endpoint.port())); return; } @@ -350,7 +354,8 @@ public: acceptor_.listen(net::socket_base::max_listen_connections, ec); if (ec) { - fail(ec, "http listener listen"); + //fail(ec, "http listener listen"); + throw std::runtime_error(fmt::format("http listen unsuccessful: {}:{}", endpoint.address().to_string(), endpoint.port())); return; } } |