summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boost_asio.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/boost_asio.cpp b/src/boost_asio.cpp
index bf00c8ff26..53f2fd6945 100644
--- a/src/boost_asio.cpp
+++ b/src/boost_asio.cpp
@@ -1 +1,22 @@
+#include "logging.hpp"
+
#include <boost/asio/impl/src.hpp>
+#include <boost/assert/source_location.hpp>
+
+#include <exception>
+
+namespace boost
+{
+void throw_exception(const std::exception& e)
+{
+ BMCWEB_LOG_CRITICAL << "Boost exception thrown " << e.what();
+ std::terminate();
+}
+
+void throw_exception(const std::exception& e, const source_location& loc)
+{
+ BMCWEB_LOG_CRITICAL << "Boost exception thrown " << e.what() << " from "
+ << loc;
+ std::terminate();
+}
+} // namespace boost