Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
Error.hpp
1#pragma once
2
3#include <fmt/format.h>
4
5#include <string>
6#include <string_view>
7#include <utility>
8
9namespace util::config {
10
12struct Error {
18 Error(std::string err) : error{std::move(err)}
19 {
20 }
21
28 Error(std::string_view key, std::string_view err)
29 : error{
30 fmt::format("The value of {} {}", key, err),
31 }
32 {
33 }
34
35 std::string error;
36};
37
38} // namespace util::config
Error(std::string err)
Constructs an Error with a custom error message.
Definition Error.hpp:18
Error(std::string_view key, std::string_view err)
Constructs an Error with a custom error message.
Definition Error.hpp:28