summaryrefslogtreecommitdiffhomepage
path: root/http.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'http.cpp')
-rw-r--r--http.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/http.cpp b/http.cpp
index 868e739..893f1f0 100644
--- a/http.cpp
+++ b/http.cpp
@@ -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;
}
}