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