1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0 2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3f706551dSEd Tanous #include "logging.hpp" 4f706551dSEd Tanous 52107fe18SEd Tanous #include <boost/asio/impl/src.hpp> 6f706551dSEd Tanous #include <boost/assert/source_location.hpp> 7f706551dSEd Tanous 8f706551dSEd Tanous #include <exception> 9f706551dSEd Tanous 10f706551dSEd Tanous namespace boost 11f706551dSEd Tanous { throw_exception(const std::exception & e)12f706551dSEd Tanousvoid throw_exception(const std::exception& e) 13f706551dSEd Tanous { 1462598e31SEd Tanous BMCWEB_LOG_CRITICAL("Boost exception thrown {}", e.what()); 15f706551dSEd Tanous std::terminate(); 16f706551dSEd Tanous } 17f706551dSEd Tanous throw_exception(const std::exception & e,const source_location & loc)18f706551dSEd Tanousvoid throw_exception(const std::exception& e, const source_location& loc) 19f706551dSEd Tanous { 2062598e31SEd Tanous BMCWEB_LOG_CRITICAL("Boost exception thrown {} from {}:{}", e.what(), 2162598e31SEd Tanous loc.file_name(), loc.line()); 22f706551dSEd Tanous std::terminate(); 23f706551dSEd Tanous } 24f706551dSEd Tanous } // namespace boost 25