Ed Tanous | f706551 | 2023-05-30 13:00:57 -0700 | [diff] [blame] | 1 | #include "logging.hpp" |
| 2 | |
Patrick Williams | 89492a1 | 2023-05-10 07:51:34 -0500 | [diff] [blame] | 3 | #include <boost/asio/impl/src.hpp> |
Ed Tanous | f706551 | 2023-05-30 13:00:57 -0700 | [diff] [blame] | 4 | #include <boost/assert/source_location.hpp> |
| 5 | |
| 6 | #include <exception> |
| 7 | |
| 8 | namespace boost |
| 9 | { |
| 10 | void throw_exception(const std::exception& e) |
| 11 | { |
Ed Tanous | 62598e3 | 2023-07-17 17:06:25 -0700 | [diff] [blame] | 12 | BMCWEB_LOG_CRITICAL("Boost exception thrown {}", e.what()); |
Ed Tanous | f706551 | 2023-05-30 13:00:57 -0700 | [diff] [blame] | 13 | std::terminate(); |
| 14 | } |
| 15 | |
| 16 | void throw_exception(const std::exception& e, const source_location& loc) |
| 17 | { |
Ed Tanous | 62598e3 | 2023-07-17 17:06:25 -0700 | [diff] [blame] | 18 | BMCWEB_LOG_CRITICAL("Boost exception thrown {} from {}:{}", e.what(), |
| 19 | loc.file_name(), loc.line()); |
Ed Tanous | f706551 | 2023-05-30 13:00:57 -0700 | [diff] [blame] | 20 | std::terminate(); |
| 21 | } |
| 22 | } // namespace boost |