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
14struct Error {
20 Error(std::string err) : error{std::move(err)}
21 {
22 }
23
30 Error(std::string_view key, std::string_view err)
31 : error{
32 fmt::format("The value of {} {}", key, err),
33 }
34 {
35 }
36
37 std::string error;
38};
39
40} // namespace util::config
Error(std::string err)
Constructs an Error with a custom error message.
Definition Error.hpp:20
Error(std::string_view key, std::string_view err)
Constructs an Error with a custom error message.
Definition Error.hpp:30