1 #pragma once
2 
3 #include <sdbusplus/exception.hpp>
4 
5 #include <cerrno>
6 
7 namespace sdbusplus::error::org::open_power::host
8 {
9 struct Event final : public sdbusplus::exception::generated_exception
10 {
11     static constexpr auto errName = "org.open_power.Host.Error.Event";
12     static constexpr auto errDesc = "A host system event was received";
13     static constexpr auto errWhat =
14         "org.open_power.Host.Error.Event: A host system event was received";
15 
namesdbusplus::error::org::open_power::host::Event16     const char* name() const noexcept override
17     {
18         return errName;
19     }
descriptionsdbusplus::error::org::open_power::host::Event20     const char* description() const noexcept override
21     {
22         return errDesc;
23     }
whatsdbusplus::error::org::open_power::host::Event24     const char* what() const noexcept override
25     {
26         return errWhat;
27     }
28 };
29 struct MaintenanceProcedure final :
30     public sdbusplus::exception::generated_exception
31 {
32     static constexpr auto errName =
33         "org.open_power.Host.Error.MaintenanceProcedure";
34     static constexpr auto errDesc =
35         "A host system event with a procedure callout";
36     static constexpr auto errWhat =
37         "org.open_power.Host.Error.MaintenanceProcedure: A host system event with a procedure callout";
38 
namesdbusplus::error::org::open_power::host::MaintenanceProcedure39     const char* name() const noexcept override
40     {
41         return errName;
42     }
descriptionsdbusplus::error::org::open_power::host::MaintenanceProcedure43     const char* description() const noexcept override
44     {
45         return errDesc;
46     }
whatsdbusplus::error::org::open_power::host::MaintenanceProcedure47     const char* what() const noexcept override
48     {
49         return errWhat;
50     }
51 };
52 } // namespace sdbusplus::error::org::open_power::host
53 
54 #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE
55 namespace sdbusplus::org::open_power::Host::Error
56 {
57 using Event = sdbusplus::error::org::open_power::host::Event;
58 using MaintenanceProcedure =
59     sdbusplus::error::org::open_power::host::MaintenanceProcedure;
60 } // namespace sdbusplus::org::open_power::Host::Error
61 #endif
62