blob: 2888f0d1dadc05c645e040ca809bf6a902b70a47 [file] [log] [blame]
Gunnar Mills93c12d32017-05-10 13:11:53 -05001// This file was autogenerated. Do not edit!
2// See elog-gen.py for more details
3#pragma once
4
Gunnar Millsb0ce9962018-09-07 13:39:10 -05005#include <phosphor-logging/elog.hpp>
6#include <phosphor-logging/log.hpp>
7#include <sdbusplus/exception.hpp>
Gunnar Mills93c12d32017-05-10 13:11:53 -05008#include <string>
9#include <tuple>
10#include <type_traits>
Gunnar Mills93c12d32017-05-10 13:11:53 -050011
12namespace sdbusplus
13{
14namespace xyz
15{
16namespace openbmc_project
17{
18namespace Software
19{
Adriana Kobylak43699ca2018-10-17 14:56:29 -050020namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -050021{
22namespace Error
23{
Adriana Kobylak2285fe02018-02-27 15:36:59 -060024struct UnTarFailure;
Gunnar Mills93c12d32017-05-10 13:11:53 -050025} // namespace Error
Adriana Kobylak43699ca2018-10-17 14:56:29 -050026} // namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -050027} // namespace Software
28} // namespace openbmc_project
29} // namespace xyz
30} // namespace sdbusplus
31
32namespace sdbusplus
33{
34namespace xyz
35{
36namespace openbmc_project
37{
38namespace Software
39{
Adriana Kobylak43699ca2018-10-17 14:56:29 -050040namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -050041{
42namespace Error
43{
Adriana Kobylak2285fe02018-02-27 15:36:59 -060044struct InternalFailure;
Gunnar Mills93c12d32017-05-10 13:11:53 -050045} // namespace Error
Adriana Kobylak43699ca2018-10-17 14:56:29 -050046} // namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -050047} // namespace Software
48} // namespace openbmc_project
49} // namespace xyz
50} // namespace sdbusplus
51
52namespace sdbusplus
53{
54namespace xyz
55{
56namespace openbmc_project
57{
58namespace Software
59{
Adriana Kobylak43699ca2018-10-17 14:56:29 -050060namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -050061{
62namespace Error
63{
Adriana Kobylak2285fe02018-02-27 15:36:59 -060064struct ManifestFileFailure;
Gunnar Mills93c12d32017-05-10 13:11:53 -050065} // namespace Error
Adriana Kobylak43699ca2018-10-17 14:56:29 -050066} // namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -050067} // namespace Software
68} // namespace openbmc_project
69} // namespace xyz
70} // namespace sdbusplus
71
Gunnar Mills93c12d32017-05-10 13:11:53 -050072namespace phosphor
73{
74
75namespace logging
76{
77
78namespace xyz
79{
80namespace openbmc_project
81{
82namespace Software
83{
Adriana Kobylak43699ca2018-10-17 14:56:29 -050084namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -050085{
86namespace _UnTarFailure
87{
88
89struct PATH
90{
91 static constexpr auto str = "PATH=%s";
92 static constexpr auto str_short = "PATH";
Adriana Kobylak2285fe02018-02-27 15:36:59 -060093 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
94 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Gunnar Mills93c12d32017-05-10 13:11:53 -050095 type _entry;
96};
97
Adriana Kobylak2285fe02018-02-27 15:36:59 -060098} // namespace _UnTarFailure
Gunnar Mills93c12d32017-05-10 13:11:53 -050099
100struct UnTarFailure : public sdbusplus::exception_t
101{
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600102 static constexpr auto errName =
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500103 "xyz.openbmc_project.Software.Image.UnTarFailure";
Gunnar Mills93c12d32017-05-10 13:11:53 -0500104 static constexpr auto errDesc = "An error occurred during untar.";
105 static constexpr auto L = level::ERR;
106 using PATH = _UnTarFailure::PATH;
107 using metadata_types = std::tuple<PATH>;
108
109 const char* name() const noexcept
110 {
111 return errName;
112 }
113
114 const char* description() const noexcept
115 {
116 return errDesc;
117 }
118
119 const char* what() const noexcept
120 {
121 return errName;
122 }
123};
124
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500125} // namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -0500126} // namespace Software
127} // namespace openbmc_project
128} // namespace xyz
129
Gunnar Mills93c12d32017-05-10 13:11:53 -0500130namespace details
131{
132
133template <>
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600134struct map_exception_type<
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500135 sdbusplus::xyz::openbmc_project::Software::Image::Error::UnTarFailure>
Gunnar Mills93c12d32017-05-10 13:11:53 -0500136{
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500137 using type = xyz::openbmc_project::Software::Image::UnTarFailure;
Gunnar Mills93c12d32017-05-10 13:11:53 -0500138};
Gunnar Millsfa34e022018-09-04 10:05:45 -0500139} // namespace details
Gunnar Mills93c12d32017-05-10 13:11:53 -0500140
141namespace xyz
142{
143namespace openbmc_project
144{
145namespace Software
146{
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500147namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -0500148{
149namespace _ManifestFileFailure
150{
151
152struct PATH
153{
154 static constexpr auto str = "PATH=%s";
155 static constexpr auto str_short = "PATH";
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600156 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
157 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Gunnar Mills93c12d32017-05-10 13:11:53 -0500158 type _entry;
159};
160
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600161} // namespace _ManifestFileFailure
Gunnar Mills93c12d32017-05-10 13:11:53 -0500162
163struct ManifestFileFailure : public sdbusplus::exception_t
164{
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600165 static constexpr auto errName =
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500166 "xyz.openbmc_project.Software.Image.ManifestFileFailure";
Gunnar Mills93c12d32017-05-10 13:11:53 -0500167 static constexpr auto errDesc = "An error when reading the Manifest file.";
168 static constexpr auto L = level::ERR;
169 using PATH = _ManifestFileFailure::PATH;
170 using metadata_types = std::tuple<PATH>;
171
172 const char* name() const noexcept
173 {
174 return errName;
175 }
176
177 const char* description() const noexcept
178 {
179 return errDesc;
180 }
181
182 const char* what() const noexcept
183 {
184 return errName;
185 }
186};
187
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500188} // namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -0500189} // namespace Software
190} // namespace openbmc_project
191} // namespace xyz
192
Gunnar Mills93c12d32017-05-10 13:11:53 -0500193namespace details
194{
195
196template <>
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500197struct map_exception_type<sdbusplus::xyz::openbmc_project::Software::Image::
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600198 Error::ManifestFileFailure>
Gunnar Mills93c12d32017-05-10 13:11:53 -0500199{
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500200 using type = xyz::openbmc_project::Software::Image::ManifestFileFailure;
Gunnar Mills93c12d32017-05-10 13:11:53 -0500201};
Gunnar Millsfa34e022018-09-04 10:05:45 -0500202} // namespace details
Gunnar Mills93c12d32017-05-10 13:11:53 -0500203
204namespace xyz
205{
206namespace openbmc_project
207{
208namespace Software
209{
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500210namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -0500211{
212namespace _InternalFailure
213{
214
215struct FAIL
216{
217 static constexpr auto str = "FAIL=%s";
218 static constexpr auto str_short = "FAIL";
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600219 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
220 explicit constexpr FAIL(const char* a) : _entry(entry(str, a)){};
Gunnar Mills93c12d32017-05-10 13:11:53 -0500221 type _entry;
222};
223
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600224} // namespace _InternalFailure
Gunnar Mills93c12d32017-05-10 13:11:53 -0500225
226struct InternalFailure : public sdbusplus::exception_t
227{
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600228 static constexpr auto errName =
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500229 "xyz.openbmc_project.Software.Image.InternalFailure";
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600230 static constexpr auto errDesc =
231 "The operation failed internally during processing the image.";
Gunnar Mills93c12d32017-05-10 13:11:53 -0500232 static constexpr auto L = level::ERR;
233 using FAIL = _InternalFailure::FAIL;
234 using metadata_types = std::tuple<FAIL>;
235
236 const char* name() const noexcept
237 {
238 return errName;
239 }
240
241 const char* description() const noexcept
242 {
243 return errDesc;
244 }
245
246 const char* what() const noexcept
247 {
248 return errName;
249 }
250};
251
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500252} // namespace Image
Gunnar Mills93c12d32017-05-10 13:11:53 -0500253} // namespace Software
254} // namespace openbmc_project
255} // namespace xyz
256
Gunnar Mills93c12d32017-05-10 13:11:53 -0500257namespace details
258{
259
260template <>
Adriana Kobylak2285fe02018-02-27 15:36:59 -0600261struct map_exception_type<
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500262 sdbusplus::xyz::openbmc_project::Software::Image::Error::InternalFailure>
Gunnar Mills93c12d32017-05-10 13:11:53 -0500263{
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500264 using type = xyz::openbmc_project::Software::Image::InternalFailure;
Gunnar Mills93c12d32017-05-10 13:11:53 -0500265};
Gunnar Millsfa34e022018-09-04 10:05:45 -0500266} // namespace details
Gunnar Mills93c12d32017-05-10 13:11:53 -0500267
Gunnar Mills93c12d32017-05-10 13:11:53 -0500268} // namespace logging
269
270} // namespace phosphor