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