Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Toggle main menu visibility
Loading...
Searching...
No Matches
Errors.hpp
Go to the documentation of this file.
1
2
#pragma once
3
4
#include <boost/json/object.hpp>
5
#include <rpcspec/Errors.hpp>
6
7
#include <optional>
8
#include <string_view>
9
10
namespace
rpc
{
11
15
struct
ClioErrorInfo
{
16
ClioError
const
code;
17
std::string_view
const
error;
18
std::string_view
const
message;
19
};
20
27
ClioErrorInfo
const
&
28
getErrorInfo
(ClioError code);
29
36
boost::json::object
37
makeError
(Status
const
& status);
38
47
boost::json::object
48
makeError
(
49
XrpldError err,
50
std::optional<std::string_view> customError = std::nullopt,
51
std::optional<std::string_view> customMessage = std::nullopt
52
);
53
62
boost::json::object
63
makeError
(
64
ClioError err,
65
std::optional<std::string_view> customError = std::nullopt,
66
std::optional<std::string_view> customMessage = std::nullopt
67
);
68
69
}
// namespace rpc
rpc
This namespace contains all the RPC logic and handlers.
Definition
AMMHelpers.cpp:17
rpc::getErrorInfo
ClioErrorInfo const & getErrorInfo(ClioError code)
Get the error info object from an clio-specific error code.
Definition
Errors.cpp:86
rpc::makeError
boost::json::object makeError(XrpldError err, std::optional< std::string_view > customError, std::optional< std::string_view > customMessage)
Generate JSON from a rpc::XrpldError.
Definition
Errors.cpp:185
rpc::ClioErrorInfo
Holds info about a particular ClioError.
Definition
Errors.hpp:15
src
rpc
Errors.hpp
Generated by
1.17.0