blob: e5427874b0051dbb51d988e6645f9119af27e698 [file] [log] [blame]
Krzysztof Grobelny62c08e92022-09-16 10:28:53 +02001#pragma once
2
3#include <sdbusplus/exception.hpp>
4
5#include <string>
6#include <string_view>
7
8namespace errors
9{
10
11class InvalidArgument final : public sdbusplus::exception::internal_exception
12{
13 public:
14 explicit InvalidArgument(std::string_view propertyName);
15 InvalidArgument(std::string_view propertyName, std::string_view info);
16
17 const char* name() const noexcept override;
18 const char* description() const noexcept override;
19 const char* what() const noexcept override;
20 int get_errno() const noexcept override;
21
22 std::string propertyName;
23
24 private:
25 std::string errWhatDetailed;
26};
27
28} // namespace errors