Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
telemetry
/
b3e03d2d6b42298411d29329b5456d62da289461
/
.
/
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