Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 1 | // This file was autogenerated. Do not edit! |
| 2 | // See elog-gen.py for more details |
| 3 | #pragma once |
| 4 | |
| 5 | #include <string> |
| 6 | #include <tuple> |
| 7 | #include <type_traits> |
| 8 | #include <sdbusplus/exception.hpp> |
| 9 | #include <phosphor-logging/log.hpp> |
| 10 | #include <phosphor-logging/elog.hpp> |
| 11 | |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 12 | |
| 13 | namespace sdbusplus |
| 14 | { |
| 15 | namespace xyz |
| 16 | { |
| 17 | namespace openbmc_project |
| 18 | { |
| 19 | namespace Led |
| 20 | { |
| 21 | namespace Fru |
| 22 | { |
| 23 | namespace Monitor |
| 24 | { |
| 25 | namespace Error |
| 26 | { |
| 27 | struct InventoryPathError; |
| 28 | } // namespace Error |
| 29 | } // namespace Monitor |
| 30 | } // namespace Fru |
| 31 | } // namespace Led |
| 32 | } // namespace openbmc_project |
| 33 | } // namespace xyz |
| 34 | } // namespace sdbusplus |
| 35 | |
| 36 | namespace sdbusplus |
| 37 | { |
| 38 | namespace xyz |
| 39 | { |
| 40 | namespace openbmc_project |
| 41 | { |
| 42 | namespace Led |
| 43 | { |
| 44 | namespace Mapper |
| 45 | { |
| 46 | namespace Error |
| 47 | { |
| 48 | struct ObjectNotFoundError; |
| 49 | } // namespace Error |
| 50 | } // namespace Mapper |
| 51 | } // namespace Led |
| 52 | } // namespace openbmc_project |
| 53 | } // namespace xyz |
| 54 | } // namespace sdbusplus |
| 55 | |
| 56 | namespace sdbusplus |
| 57 | { |
| 58 | namespace xyz |
| 59 | { |
| 60 | namespace openbmc_project |
| 61 | { |
| 62 | namespace Led |
| 63 | { |
| 64 | namespace Mapper |
| 65 | { |
| 66 | namespace Error |
| 67 | { |
| 68 | struct MethodError; |
| 69 | } // namespace Error |
| 70 | } // namespace Mapper |
| 71 | } // namespace Led |
| 72 | } // namespace openbmc_project |
| 73 | } // namespace xyz |
| 74 | } // namespace sdbusplus |
| 75 | |
| 76 | |
| 77 | namespace phosphor |
| 78 | { |
| 79 | |
| 80 | namespace logging |
| 81 | { |
| 82 | |
| 83 | namespace xyz |
| 84 | { |
| 85 | namespace openbmc_project |
| 86 | { |
| 87 | namespace Led |
| 88 | { |
| 89 | namespace Fru |
| 90 | { |
| 91 | namespace Monitor |
| 92 | { |
| 93 | namespace _InventoryPathError |
| 94 | { |
| 95 | |
| 96 | struct PATH |
| 97 | { |
| 98 | static constexpr auto str = "PATH=%s"; |
| 99 | static constexpr auto str_short = "PATH"; |
| 100 | using type = std::tuple<std::decay_t<decltype(str)>,const char*>; |
| 101 | explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {}; |
| 102 | type _entry; |
| 103 | }; |
| 104 | |
| 105 | } // namespace _InventoryPathError |
| 106 | |
| 107 | struct InventoryPathError : public sdbusplus::exception_t |
| 108 | { |
| 109 | static constexpr auto errName = "xyz.openbmc_project.Led.Fru.Monitor.InventoryPathError"; |
| 110 | static constexpr auto errDesc = "Invalid Inventory Path."; |
| 111 | static constexpr auto L = level::INFO; |
| 112 | using PATH = _InventoryPathError::PATH; |
| 113 | using metadata_types = std::tuple<PATH>; |
| 114 | |
| 115 | const char* name() const noexcept |
| 116 | { |
| 117 | return errName; |
| 118 | } |
| 119 | |
| 120 | const char* description() const noexcept |
| 121 | { |
| 122 | return errDesc; |
| 123 | } |
| 124 | |
| 125 | const char* what() const noexcept |
| 126 | { |
| 127 | return errName; |
| 128 | } |
| 129 | }; |
| 130 | |
| 131 | } // namespace Monitor |
| 132 | } // namespace Fru |
| 133 | } // namespace Led |
| 134 | } // namespace openbmc_project |
| 135 | } // namespace xyz |
| 136 | |
| 137 | |
| 138 | namespace details |
| 139 | { |
| 140 | |
| 141 | template <> |
| 142 | struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Fru::Monitor::Error::InventoryPathError> |
| 143 | { |
| 144 | using type = xyz::openbmc_project::Led::Fru::Monitor::InventoryPathError; |
| 145 | }; |
| 146 | |
| 147 | } |
| 148 | |
| 149 | namespace xyz |
| 150 | { |
| 151 | namespace openbmc_project |
| 152 | { |
| 153 | namespace Led |
| 154 | { |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 155 | namespace Mapper |
| 156 | { |
| 157 | namespace _MethodError |
| 158 | { |
| 159 | |
| 160 | struct METHOD_NAME |
| 161 | { |
| 162 | static constexpr auto str = "METHOD_NAME=%s"; |
| 163 | static constexpr auto str_short = "METHOD_NAME"; |
| 164 | using type = std::tuple<std::decay_t<decltype(str)>,const char*>; |
| 165 | explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)) {}; |
| 166 | type _entry; |
| 167 | }; |
| 168 | struct PATH |
| 169 | { |
| 170 | static constexpr auto str = "PATH=%s"; |
| 171 | static constexpr auto str_short = "PATH"; |
| 172 | using type = std::tuple<std::decay_t<decltype(str)>,const char*>; |
| 173 | explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {}; |
| 174 | type _entry; |
| 175 | }; |
| 176 | struct INTERFACE |
| 177 | { |
| 178 | static constexpr auto str = "INTERFACE=%s"; |
| 179 | static constexpr auto str_short = "INTERFACE"; |
| 180 | using type = std::tuple<std::decay_t<decltype(str)>,const char*>; |
| 181 | explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)) {}; |
| 182 | type _entry; |
| 183 | }; |
| 184 | |
| 185 | } // namespace _MethodError |
| 186 | |
| 187 | struct MethodError : public sdbusplus::exception_t |
| 188 | { |
| 189 | static constexpr auto errName = "xyz.openbmc_project.Led.Mapper.MethodError"; |
| 190 | static constexpr auto errDesc = "Failed to invoke ObjectMapper method"; |
| 191 | static constexpr auto L = level::INFO; |
| 192 | using METHOD_NAME = _MethodError::METHOD_NAME; |
| 193 | using PATH = _MethodError::PATH; |
| 194 | using INTERFACE = _MethodError::INTERFACE; |
| 195 | using metadata_types = std::tuple<METHOD_NAME, PATH, INTERFACE>; |
| 196 | |
| 197 | const char* name() const noexcept |
| 198 | { |
| 199 | return errName; |
| 200 | } |
| 201 | |
| 202 | const char* description() const noexcept |
| 203 | { |
| 204 | return errDesc; |
| 205 | } |
| 206 | |
| 207 | const char* what() const noexcept |
| 208 | { |
| 209 | return errName; |
| 210 | } |
| 211 | }; |
| 212 | |
| 213 | } // namespace Mapper |
| 214 | } // namespace Led |
| 215 | } // namespace openbmc_project |
| 216 | } // namespace xyz |
| 217 | |
| 218 | |
| 219 | namespace details |
| 220 | { |
| 221 | |
| 222 | template <> |
| 223 | struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Mapper::Error::MethodError> |
| 224 | { |
| 225 | using type = xyz::openbmc_project::Led::Mapper::MethodError; |
| 226 | }; |
| 227 | |
| 228 | } |
| 229 | |
| 230 | namespace xyz |
| 231 | { |
| 232 | namespace openbmc_project |
| 233 | { |
| 234 | namespace Led |
| 235 | { |
| 236 | namespace Mapper |
| 237 | { |
| 238 | namespace _ObjectNotFoundError |
| 239 | { |
| 240 | |
| 241 | struct METHOD_NAME |
| 242 | { |
| 243 | static constexpr auto str = "METHOD_NAME=%s"; |
| 244 | static constexpr auto str_short = "METHOD_NAME"; |
| 245 | using type = std::tuple<std::decay_t<decltype(str)>,const char*>; |
| 246 | explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)) {}; |
| 247 | type _entry; |
| 248 | }; |
| 249 | struct PATH |
| 250 | { |
| 251 | static constexpr auto str = "PATH=%s"; |
| 252 | static constexpr auto str_short = "PATH"; |
| 253 | using type = std::tuple<std::decay_t<decltype(str)>,const char*>; |
| 254 | explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {}; |
| 255 | type _entry; |
| 256 | }; |
| 257 | struct INTERFACE |
| 258 | { |
| 259 | static constexpr auto str = "INTERFACE=%s"; |
| 260 | static constexpr auto str_short = "INTERFACE"; |
| 261 | using type = std::tuple<std::decay_t<decltype(str)>,const char*>; |
| 262 | explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)) {}; |
| 263 | type _entry; |
| 264 | }; |
| 265 | |
| 266 | } // namespace _ObjectNotFoundError |
| 267 | |
| 268 | struct ObjectNotFoundError : public sdbusplus::exception_t |
| 269 | { |
| 270 | static constexpr auto errName = "xyz.openbmc_project.Led.Mapper.ObjectNotFoundError"; |
| 271 | static constexpr auto errDesc = "Failed to get response from the method."; |
| 272 | static constexpr auto L = level::INFO; |
| 273 | using METHOD_NAME = _ObjectNotFoundError::METHOD_NAME; |
| 274 | using PATH = _ObjectNotFoundError::PATH; |
| 275 | using INTERFACE = _ObjectNotFoundError::INTERFACE; |
| 276 | using metadata_types = std::tuple<METHOD_NAME, PATH, INTERFACE>; |
| 277 | |
| 278 | const char* name() const noexcept |
| 279 | { |
| 280 | return errName; |
| 281 | } |
| 282 | |
| 283 | const char* description() const noexcept |
| 284 | { |
| 285 | return errDesc; |
| 286 | } |
| 287 | |
| 288 | const char* what() const noexcept |
| 289 | { |
| 290 | return errName; |
| 291 | } |
| 292 | }; |
| 293 | |
| 294 | } // namespace Mapper |
| 295 | } // namespace Led |
| 296 | } // namespace openbmc_project |
| 297 | } // namespace xyz |
| 298 | |
| 299 | |
| 300 | namespace details |
| 301 | { |
| 302 | |
| 303 | template <> |
| 304 | struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Mapper::Error::ObjectNotFoundError> |
| 305 | { |
| 306 | using type = xyz::openbmc_project::Led::Mapper::ObjectNotFoundError; |
| 307 | }; |
| 308 | |
| 309 | } |
| 310 | |
| 311 | |
| 312 | } // namespace logging |
| 313 | |
| 314 | } // namespace phosphor |