Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
telemetry
/
8bc2e7cb0c810b7867d23e4c2691013ce1defbf4
/
.
/
tests
/
src
/
utils
/
set_exception.hpp
blob: 6680af0201e28e809fbaf1f20893934ef8654da8 [
file
] [
log
] [
blame
]
#pragma
once
#include
<future>
namespace
utils
{
template
<
class
T
>
inline
void
setException
(
std
::
promise
<
T
>&
promise
,
const
std
::
string
&
message
)
{
promise
.
set_exception
(
std
::
make_exception_ptr
(
std
::
runtime_error
(
message
)));
}
}
// namespace utils