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