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