From 6081819802972c716745a44e3521ccb3b3cf7b1a Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 11 Apr 2020 13:17:32 +0200 Subject: Support IPv6 --- server.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'server.cpp') diff --git a/server.cpp b/server.cpp index 26feabc..395be7d 100644 --- a/server.cpp +++ b/server.cpp @@ -18,6 +18,8 @@ #include #include +#include +#include #include #include @@ -92,6 +94,14 @@ const Socket& Server::GetSocket() plugin_type Server::GetPlugin(const std::string& name) { - return m_plugins.at(name); // Config validation made sure that we will find it here. For safety, a thrown exception will be caught in webserver.cpp + try { + return m_plugins.at(name); + } catch (const std::out_of_range& ex) { + std::cout << "Out of range at Server::GetPlugin(): " << name << std::endl; + std::rethrow_exception(std::current_exception()); + } catch (...) { + std::cout << "Unknown exception at Server::GetPlugin(): " << name << std::endl; + std::rethrow_exception(std::current_exception()); + } } -- cgit v1.2.3