Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
Error.hpp
1
#pragma once
2
3
#include <fmt/format.h>
4
#include <fmt/std.h>
5
6
#include <string>
7
#include <utility>
8
9
namespace
util::async
{
10
14
struct
ExecutionError
{
21
ExecutionError
(std::string tid, std::string msg)
22
: message{fmt::format(
"Thread {} exit with exception: {}"
, std::move(tid), std::move(msg))}
23
{
24
}
25
26
ExecutionError
(
ExecutionError
const
&) =
default
;
27
ExecutionError
(
ExecutionError
&&) =
default
;
28
ExecutionError
&
29
operator=(
ExecutionError
&&) =
default
;
30
ExecutionError
&
31
operator=(
ExecutionError
const
&) =
default
;
32
38
[[nodiscard]]
39
operator
char
const
*()
const
noexcept
40
{
41
return
message.c_str();
42
}
43
44
std::string message;
45
};
46
47
}
// namespace util::async
util::async
This namespace implements an async framework built on top of execution contexts.
Definition
AnyExecutionContext.hpp:18
util::async::ExecutionError
Error channel type for async operation of any ExecutionContext.
Definition
Error.hpp:14
util::async::ExecutionError::ExecutionError
ExecutionError(std::string tid, std::string msg)
Construct a new Execution Error object.
Definition
Error.hpp:21
src
util
async
Error.hpp
Generated by
1.16.1