summaryrefslogtreecommitdiffhomepage
path: root/http.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-14 11:12:21 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-14 11:12:21 +0100
commit3b42785c57768e619ade198f7b4760e16288e0f3 (patch)
treee0a64115a6fea8c89629de2fdfc4ef1cc02874e9 /http.cpp
parentc0d9d61e3330d4f69a9547cc3d0e62970fb7427e (diff)
Added config tests, moved from BSD license to CC0
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;
}
}