Tom Joseph | 448e74e | 2017-07-24 23:08:56 +0530 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/exception.hpp> |
| 4 | |
Patrick Williams | 6856f1b | 2023-09-01 16:10:07 -0500 | [diff] [blame] | 5 | #include <cerrno> |
Tom Joseph | 448e74e | 2017-07-24 23:08:56 +0530 | [diff] [blame] | 6 | |
Patrick Williams | 6856f1b | 2023-09-01 16:10:07 -0500 | [diff] [blame] | 7 | namespace sdbusplus::error::org::open_power::host |
| 8 | { |
Patrick Williams | b3f74ac | 2021-09-09 06:45:37 -0500 | [diff] [blame] | 9 | struct Event final : public sdbusplus::exception::generated_exception |
Tom Joseph | 448e74e | 2017-07-24 23:08:56 +0530 | [diff] [blame] | 10 | { |
Marri Devender Rao | b0b395b | 2017-10-24 10:14:14 -0500 | [diff] [blame] | 11 | static constexpr auto errName = "org.open_power.Host.Error.Event"; |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 12 | static constexpr auto errDesc = "A host system event was received"; |
Tom Joseph | 448e74e | 2017-07-24 23:08:56 +0530 | [diff] [blame] | 13 | static constexpr auto errWhat = |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 14 | "org.open_power.Host.Error.Event: A host system event was received"; |
Tom Joseph | 448e74e | 2017-07-24 23:08:56 +0530 | [diff] [blame] | 15 | |
Patrick Williams | 6856f1b | 2023-09-01 16:10:07 -0500 | [diff] [blame] | 16 | const char* name() const noexcept override |
| 17 | { |
| 18 | return errName; |
| 19 | } |
| 20 | const char* description() const noexcept override |
| 21 | { |
| 22 | return errDesc; |
| 23 | } |
| 24 | const char* what() const noexcept override |
| 25 | { |
| 26 | return errWhat; |
| 27 | } |
Tom Joseph | 448e74e | 2017-07-24 23:08:56 +0530 | [diff] [blame] | 28 | }; |
Patrick Williams | fbc6c9d | 2023-05-10 07:50:16 -0500 | [diff] [blame] | 29 | struct MaintenanceProcedure final : |
| 30 | public sdbusplus::exception::generated_exception |
Tom Joseph | b647d5b | 2017-10-31 17:25:33 +0530 | [diff] [blame] | 31 | { |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 32 | static constexpr auto errName = |
| 33 | "org.open_power.Host.Error.MaintenanceProcedure"; |
Tom Joseph | b647d5b | 2017-10-31 17:25:33 +0530 | [diff] [blame] | 34 | static constexpr auto errDesc = |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 35 | "A host system event with a procedure callout"; |
Tom Joseph | b647d5b | 2017-10-31 17:25:33 +0530 | [diff] [blame] | 36 | static constexpr auto errWhat = |
Patrick Williams | 6856f1b | 2023-09-01 16:10:07 -0500 | [diff] [blame] | 37 | "org.open_power.Host.Error.MaintenanceProcedure: A host system event with a procedure callout"; |
Tom Joseph | b647d5b | 2017-10-31 17:25:33 +0530 | [diff] [blame] | 38 | |
Patrick Williams | 6856f1b | 2023-09-01 16:10:07 -0500 | [diff] [blame] | 39 | const char* name() const noexcept override |
| 40 | { |
| 41 | return errName; |
| 42 | } |
| 43 | const char* description() const noexcept override |
| 44 | { |
| 45 | return errDesc; |
| 46 | } |
| 47 | const char* what() const noexcept override |
| 48 | { |
| 49 | return errWhat; |
| 50 | } |
Tom Joseph | b647d5b | 2017-10-31 17:25:33 +0530 | [diff] [blame] | 51 | }; |
Patrick Williams | 6856f1b | 2023-09-01 16:10:07 -0500 | [diff] [blame] | 52 | } // namespace sdbusplus::error::org::open_power::host |
Tom Joseph | b647d5b | 2017-10-31 17:25:33 +0530 | [diff] [blame] | 53 | |
Patrick Williams | 6856f1b | 2023-09-01 16:10:07 -0500 | [diff] [blame] | 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 |