blob: 477b9e48a8294bdf0c2bf85094d844f3d6bc341a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#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 {} from {}:{}", e.what(),
loc.file_name(), loc.line());
std::terminate();
}
} // namespace boost
|