blob: 9443399c3e0bac076333646e119a85a0ca485d7c [file] [log] [blame]
Dhruvaraj Subhashchandran2de0cfa2017-04-25 07:26:39 -05001// 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
12namespace sdbusplus
13{
14namespace xyz
15{
16namespace openbmc_project
17{
18namespace Common
19{
Dhruvaraj Subhashchandran7ce535c2017-05-15 05:06:36 -050020namespace Error
21{
22 struct Timeout;
23} // namespace Error
24} // namespace Common
25} // namespace openbmc_project
26} // namespace xyz
27} // namespace sdbusplus
28
29namespace sdbusplus
30{
31namespace xyz
32{
33namespace openbmc_project
34{
35namespace Common
36{
Dhruvaraj Subhashchandran2de0cfa2017-04-25 07:26:39 -050037namespace Callout
38{
39namespace Error
40{
41 struct GPIO;
42} // namespace Error
43} // namespace Callout
44} // namespace Common
45} // namespace openbmc_project
46} // namespace xyz
47} // namespace sdbusplus
48
49namespace sdbusplus
50{
51namespace org
52{
53namespace open_power
54{
55namespace Proc
56{
57namespace CFAM
58{
59namespace Error
60{
61 struct ReadFailure;
62} // namespace Error
63} // namespace CFAM
64} // namespace Proc
65} // namespace open_power
66} // namespace org
67} // namespace sdbusplus
68
69namespace sdbusplus
70{
71namespace xyz
72{
73namespace openbmc_project
74{
75namespace Common
76{
77namespace Callout
78{
79namespace Error
80{
81 struct Inventory;
82} // namespace Error
83} // namespace Callout
84} // namespace Common
85} // namespace openbmc_project
86} // namespace xyz
87} // namespace sdbusplus
88
89namespace sdbusplus
90{
91namespace xyz
92{
93namespace openbmc_project
94{
95namespace Common
96{
97namespace Callout
98{
99namespace Error
100{
101 struct IIC;
102} // namespace Error
103} // namespace Callout
104} // namespace Common
105} // namespace openbmc_project
106} // namespace xyz
107} // namespace sdbusplus
108
109namespace sdbusplus
110{
111namespace org
112{
113namespace open_power
114{
115namespace Proc
116{
117namespace CFAM
118{
119namespace Error
120{
121 struct WriteFailure;
122} // namespace Error
123} // namespace CFAM
124} // namespace Proc
125} // namespace open_power
126} // namespace org
127} // namespace sdbusplus
128
129namespace sdbusplus
130{
131namespace xyz
132{
133namespace openbmc_project
134{
135namespace Common
136{
Dhruvaraj Subhashchandran7ce535c2017-05-15 05:06:36 -0500137namespace Error
138{
139 struct InternalFailure;
140} // namespace Error
141} // namespace Common
142} // namespace openbmc_project
143} // namespace xyz
144} // namespace sdbusplus
145
146namespace sdbusplus
147{
148namespace xyz
149{
150namespace openbmc_project
151{
152namespace Common
153{
Dhruvaraj Subhashchandran2de0cfa2017-04-25 07:26:39 -0500154namespace Callout
155{
156namespace Error
157{
158 struct Device;
159} // namespace Error
160} // namespace Callout
161} // namespace Common
162} // namespace openbmc_project
163} // namespace xyz
164} // namespace sdbusplus
165
166namespace sdbusplus
167{
168namespace org
169{
170namespace open_power
171{
172namespace Proc
173{
174namespace CFAM
175{
176namespace Error
177{
178 struct OpenFailure;
179} // namespace Error
180} // namespace CFAM
181} // namespace Proc
182} // namespace open_power
183} // namespace org
184} // namespace sdbusplus
185
186namespace sdbusplus
187{
188namespace org
189{
190namespace open_power
191{
192namespace Proc
193{
194namespace CFAM
195{
196namespace Error
197{
198 struct SeekFailure;
199} // namespace Error
200} // namespace CFAM
201} // namespace Proc
202} // namespace open_power
203} // namespace org
204} // namespace sdbusplus
205
206namespace sdbusplus
207{
208namespace xyz
209{
210namespace openbmc_project
211{
212namespace Common
213{
Dhruvaraj Subhashchandran7ce535c2017-05-15 05:06:36 -0500214namespace Error
215{
216 struct InvalidArgument;
217} // namespace Error
218} // namespace Common
219} // namespace openbmc_project
220} // namespace xyz
221} // namespace sdbusplus
222
223namespace sdbusplus
224{
225namespace xyz
226{
227namespace openbmc_project
228{
229namespace Common
230{
Dhruvaraj Subhashchandran2de0cfa2017-04-25 07:26:39 -0500231namespace Callout
232{
233namespace Error
234{
235 struct IPMISensor;
236} // namespace Error
237} // namespace Callout
238} // namespace Common
239} // namespace openbmc_project
240} // namespace xyz
241} // namespace sdbusplus
242
243
244namespace phosphor
245{
246
247namespace logging
248{
249
250namespace xyz
251{
252namespace openbmc_project
253{
254namespace Common
255{
256namespace Callout
257{
258namespace _Device
259{
260
261struct CALLOUT_ERRNO
262{
263 static constexpr auto str = "CALLOUT_ERRNO=%d";
264 static constexpr auto str_short = "CALLOUT_ERRNO";
265 using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
266 explicit constexpr CALLOUT_ERRNO(int32_t a) : _entry(entry(str, a)) {};
267 type _entry;
268};
269struct CALLOUT_DEVICE_PATH
270{
271 static constexpr auto str = "CALLOUT_DEVICE_PATH=%s";
272 static constexpr auto str_short = "CALLOUT_DEVICE_PATH";
273 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
274 explicit constexpr CALLOUT_DEVICE_PATH(const char* a) : _entry(entry(str, a)) {};
275 type _entry;
276};
277
278} // namespace _Device
279
280struct Device : public sdbusplus::exception_t
281{
282 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.Device";
283 static constexpr auto errDesc = "Generic device callout";
284 static constexpr auto L = level::INFO;
285 using CALLOUT_ERRNO = _Device::CALLOUT_ERRNO;
286 using CALLOUT_DEVICE_PATH = _Device::CALLOUT_DEVICE_PATH;
287 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
288
289 const char* name() const noexcept
290 {
291 return errName;
292 }
293
294 const char* description() const noexcept
295 {
296 return errDesc;
297 }
298
299 const char* what() const noexcept
300 {
301 return errName;
302 }
303};
304
305} // namespace Callout
306} // namespace Common
307} // namespace openbmc_project
308} // namespace xyz
309
310
311namespace details
312{
313
314template <>
315struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::Device>
316{
317 using type = xyz::openbmc_project::Common::Callout::Device;
318};
319
320}
321
322namespace xyz
323{
324namespace openbmc_project
325{
326namespace Common
327{
328namespace Callout
329{
330namespace _GPIO
331{
332
333struct CALLOUT_GPIO_NUM
334{
335 static constexpr auto str = "CALLOUT_GPIO_NUM=%u";
336 static constexpr auto str_short = "CALLOUT_GPIO_NUM";
337 using type = std::tuple<std::decay_t<decltype(str)>,uint32_t>;
338 explicit constexpr CALLOUT_GPIO_NUM(uint32_t a) : _entry(entry(str, a)) {};
339 type _entry;
340};
341
342} // namespace _GPIO
343
344struct GPIO : public sdbusplus::exception_t
345{
346 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.GPIO";
347 static constexpr auto errDesc = "Callout GPIO pin";
348 static constexpr auto L = level::INFO;
349 using CALLOUT_GPIO_NUM = _GPIO::CALLOUT_GPIO_NUM;
350 using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
351 using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
352 using metadata_types = std::tuple<CALLOUT_GPIO_NUM, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
353
354 const char* name() const noexcept
355 {
356 return errName;
357 }
358
359 const char* description() const noexcept
360 {
361 return errDesc;
362 }
363
364 const char* what() const noexcept
365 {
366 return errName;
367 }
368};
369
370} // namespace Callout
371} // namespace Common
372} // namespace openbmc_project
373} // namespace xyz
374
375
376namespace details
377{
378
379template <>
380struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO>
381{
382 using type = xyz::openbmc_project::Common::Callout::GPIO;
383};
384
385}
386
387namespace xyz
388{
389namespace openbmc_project
390{
391namespace Common
392{
393namespace Callout
394{
395namespace _IIC
396{
397
398struct CALLOUT_IIC_BUS
399{
400 static constexpr auto str = "CALLOUT_IIC_BUS=%s";
401 static constexpr auto str_short = "CALLOUT_IIC_BUS";
402 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
403 explicit constexpr CALLOUT_IIC_BUS(const char* a) : _entry(entry(str, a)) {};
404 type _entry;
405};
406struct CALLOUT_IIC_ADDR
407{
408 static constexpr auto str = "CALLOUT_IIC_ADDR=0x%hx";
409 static constexpr auto str_short = "CALLOUT_IIC_ADDR";
410 using type = std::tuple<std::decay_t<decltype(str)>,uint16_t>;
411 explicit constexpr CALLOUT_IIC_ADDR(uint16_t a) : _entry(entry(str, a)) {};
412 type _entry;
413};
414
415} // namespace _IIC
416
417struct IIC : public sdbusplus::exception_t
418{
419 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.IIC";
420 static constexpr auto errDesc = "Callout IIC device";
421 static constexpr auto L = level::INFO;
422 using CALLOUT_IIC_BUS = _IIC::CALLOUT_IIC_BUS;
423 using CALLOUT_IIC_ADDR = _IIC::CALLOUT_IIC_ADDR;
424 using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
425 using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
426 using metadata_types = std::tuple<CALLOUT_IIC_BUS, CALLOUT_IIC_ADDR, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
427
428 const char* name() const noexcept
429 {
430 return errName;
431 }
432
433 const char* description() const noexcept
434 {
435 return errDesc;
436 }
437
438 const char* what() const noexcept
439 {
440 return errName;
441 }
442};
443
444} // namespace Callout
445} // namespace Common
446} // namespace openbmc_project
447} // namespace xyz
448
449
450namespace details
451{
452
453template <>
454struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::IIC>
455{
456 using type = xyz::openbmc_project::Common::Callout::IIC;
457};
458
459}
460
461namespace xyz
462{
463namespace openbmc_project
464{
465namespace Common
466{
467namespace Callout
468{
469namespace _Inventory
470{
471
472struct CALLOUT_INVENTORY_PATH
473{
474 static constexpr auto str = "CALLOUT_INVENTORY_PATH=%s";
475 static constexpr auto str_short = "CALLOUT_INVENTORY_PATH";
476 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
477 explicit constexpr CALLOUT_INVENTORY_PATH(const char* a) : _entry(entry(str, a)) {};
478 type _entry;
479};
480
481} // namespace _Inventory
482
483struct Inventory : public sdbusplus::exception_t
484{
485 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.Inventory";
486 static constexpr auto errDesc = "Inventory item callout";
487 static constexpr auto L = level::INFO;
488 using CALLOUT_INVENTORY_PATH = _Inventory::CALLOUT_INVENTORY_PATH;
489 using metadata_types = std::tuple<CALLOUT_INVENTORY_PATH>;
490
491 const char* name() const noexcept
492 {
493 return errName;
494 }
495
496 const char* description() const noexcept
497 {
498 return errDesc;
499 }
500
501 const char* what() const noexcept
502 {
503 return errName;
504 }
505};
506
507} // namespace Callout
508} // namespace Common
509} // namespace openbmc_project
510} // namespace xyz
511
512
513namespace details
514{
515
516template <>
517struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::Inventory>
518{
519 using type = xyz::openbmc_project::Common::Callout::Inventory;
520};
521
522}
523
524namespace xyz
525{
526namespace openbmc_project
527{
528namespace Common
529{
530namespace Callout
531{
532namespace _IPMISensor
533{
534
535struct CALLOUT_IPMI_SENSOR_NUM
536{
537 static constexpr auto str = "CALLOUT_IPMI_SENSOR_NUM=%u";
538 static constexpr auto str_short = "CALLOUT_IPMI_SENSOR_NUM";
539 using type = std::tuple<std::decay_t<decltype(str)>,uint32_t>;
540 explicit constexpr CALLOUT_IPMI_SENSOR_NUM(uint32_t a) : _entry(entry(str, a)) {};
541 type _entry;
542};
543
544} // namespace _IPMISensor
545
546struct IPMISensor : public sdbusplus::exception_t
547{
548 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.IPMISensor";
549 static constexpr auto errDesc = "Callout IPMI sensor";
550 static constexpr auto L = level::INFO;
551 using CALLOUT_IPMI_SENSOR_NUM = _IPMISensor::CALLOUT_IPMI_SENSOR_NUM;
552 using metadata_types = std::tuple<CALLOUT_IPMI_SENSOR_NUM>;
553
554 const char* name() const noexcept
555 {
556 return errName;
557 }
558
559 const char* description() const noexcept
560 {
561 return errDesc;
562 }
563
564 const char* what() const noexcept
565 {
566 return errName;
567 }
568};
569
570} // namespace Callout
571} // namespace Common
572} // namespace openbmc_project
573} // namespace xyz
574
575
576namespace details
577{
578
579template <>
580struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::IPMISensor>
581{
582 using type = xyz::openbmc_project::Common::Callout::IPMISensor;
583};
584
585}
586
587namespace org
588{
589namespace open_power
590{
591namespace Proc
592{
593namespace CFAM
594{
595namespace _OpenFailure
596{
597
598struct ERRNO
599{
600 static constexpr auto str = "ERRNO=%d";
601 static constexpr auto str_short = "ERRNO";
602 using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
603 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)) {};
604 type _entry;
605};
606struct PATH
607{
608 static constexpr auto str = "PATH=%s";
609 static constexpr auto str_short = "PATH";
610 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
611 explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
612 type _entry;
613};
614
615} // namespace _OpenFailure
616
617struct OpenFailure : public sdbusplus::exception_t
618{
619 static constexpr auto errName = "org.open_power.Proc.CFAM.OpenFailure";
620 static constexpr auto errDesc = "Failed to open the device.";
621 static constexpr auto L = level::INFO;
622 using ERRNO = _OpenFailure::ERRNO;
623 using PATH = _OpenFailure::PATH;
624 using metadata_types = std::tuple<ERRNO, PATH>;
625
626 const char* name() const noexcept
627 {
628 return errName;
629 }
630
631 const char* description() const noexcept
632 {
633 return errDesc;
634 }
635
636 const char* what() const noexcept
637 {
638 return errName;
639 }
640};
641
642} // namespace CFAM
643} // namespace Proc
644} // namespace open_power
645} // namespace org
646
647
648namespace details
649{
650
651template <>
652struct map_exception_type<sdbusplus::org::open_power::Proc::CFAM::Error::OpenFailure>
653{
654 using type = org::open_power::Proc::CFAM::OpenFailure;
655};
656
657}
658
659namespace org
660{
661namespace open_power
662{
663namespace Proc
664{
665namespace CFAM
666{
667namespace _ReadFailure
668{
669
670
671} // namespace _ReadFailure
672
673struct ReadFailure : public sdbusplus::exception_t
674{
675 static constexpr auto errName = "org.open_power.Proc.CFAM.ReadFailure";
676 static constexpr auto errDesc = "Failed to read from the device.";
677 static constexpr auto L = level::INFO;
678 using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
679 using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
680 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
681
682 const char* name() const noexcept
683 {
684 return errName;
685 }
686
687 const char* description() const noexcept
688 {
689 return errDesc;
690 }
691
692 const char* what() const noexcept
693 {
694 return errName;
695 }
696};
697
698} // namespace CFAM
699} // namespace Proc
700} // namespace open_power
701} // namespace org
702
703
704namespace details
705{
706
707template <>
708struct map_exception_type<sdbusplus::org::open_power::Proc::CFAM::Error::ReadFailure>
709{
710 using type = org::open_power::Proc::CFAM::ReadFailure;
711};
712
713}
714
715namespace org
716{
717namespace open_power
718{
719namespace Proc
720{
721namespace CFAM
722{
723namespace _WriteFailure
724{
725
726
727} // namespace _WriteFailure
728
729struct WriteFailure : public sdbusplus::exception_t
730{
731 static constexpr auto errName = "org.open_power.Proc.CFAM.WriteFailure";
732 static constexpr auto errDesc = "Failed to write to the device.";
733 static constexpr auto L = level::INFO;
734 using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
735 using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
736 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
737
738 const char* name() const noexcept
739 {
740 return errName;
741 }
742
743 const char* description() const noexcept
744 {
745 return errDesc;
746 }
747
748 const char* what() const noexcept
749 {
750 return errName;
751 }
752};
753
754} // namespace CFAM
755} // namespace Proc
756} // namespace open_power
757} // namespace org
758
759
760namespace details
761{
762
763template <>
764struct map_exception_type<sdbusplus::org::open_power::Proc::CFAM::Error::WriteFailure>
765{
766 using type = org::open_power::Proc::CFAM::WriteFailure;
767};
768
769}
770
771namespace org
772{
773namespace open_power
774{
775namespace Proc
776{
777namespace CFAM
778{
779namespace _SeekFailure
780{
781
782struct ERRNO
783{
784 static constexpr auto str = "ERRNO=%d";
785 static constexpr auto str_short = "ERRNO";
786 using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
787 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)) {};
788 type _entry;
789};
790struct ADDRESS
791{
792 static constexpr auto str = "ADDRESS=0x%0x";
793 static constexpr auto str_short = "ADDRESS";
794 using type = std::tuple<std::decay_t<decltype(str)>,uint16_t>;
795 explicit constexpr ADDRESS(uint16_t a) : _entry(entry(str, a)) {};
796 type _entry;
797};
798struct OFFSET
799{
800 static constexpr auto str = "OFFSET=%d";
801 static constexpr auto str_short = "OFFSET";
802 using type = std::tuple<std::decay_t<decltype(str)>,uint16_t>;
803 explicit constexpr OFFSET(uint16_t a) : _entry(entry(str, a)) {};
804 type _entry;
805};
806struct PATH
807{
808 static constexpr auto str = "PATH=%s";
809 static constexpr auto str_short = "PATH";
810 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
811 explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
812 type _entry;
813};
814
815} // namespace _SeekFailure
816
817struct SeekFailure : public sdbusplus::exception_t
818{
819 static constexpr auto errName = "org.open_power.Proc.CFAM.SeekFailure";
820 static constexpr auto errDesc = "Failed to seek on the device.";
821 static constexpr auto L = level::INFO;
822 using ERRNO = _SeekFailure::ERRNO;
823 using ADDRESS = _SeekFailure::ADDRESS;
824 using OFFSET = _SeekFailure::OFFSET;
825 using PATH = _SeekFailure::PATH;
826 using metadata_types = std::tuple<ERRNO, ADDRESS, OFFSET, PATH>;
827
828 const char* name() const noexcept
829 {
830 return errName;
831 }
832
833 const char* description() const noexcept
834 {
835 return errDesc;
836 }
837
838 const char* what() const noexcept
839 {
840 return errName;
841 }
842};
843
844} // namespace CFAM
845} // namespace Proc
846} // namespace open_power
847} // namespace org
848
849
850namespace details
851{
852
853template <>
854struct map_exception_type<sdbusplus::org::open_power::Proc::CFAM::Error::SeekFailure>
855{
856 using type = org::open_power::Proc::CFAM::SeekFailure;
857};
858
859}
860
Dhruvaraj Subhashchandran7ce535c2017-05-15 05:06:36 -0500861namespace xyz
862{
863namespace openbmc_project
864{
865namespace Common
866{
867namespace _Timeout
868{
869
870struct TIMEOUT_IN_MSEC
871{
872 static constexpr auto str = "TIMEOUT_IN_MSEC=%llu";
873 static constexpr auto str_short = "TIMEOUT_IN_MSEC";
874 using type = std::tuple<std::decay_t<decltype(str)>,uint64_t>;
875 explicit constexpr TIMEOUT_IN_MSEC(uint64_t a) : _entry(entry(str, a)) {};
876 type _entry;
877};
878
879} // namespace _Timeout
880
881struct Timeout : public sdbusplus::exception_t
882{
883 static constexpr auto errName = "xyz.openbmc_project.Common.Timeout";
884 static constexpr auto errDesc = "Operation timed out.";
885 static constexpr auto L = level::INFO;
886 using TIMEOUT_IN_MSEC = _Timeout::TIMEOUT_IN_MSEC;
887 using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
888
889 const char* name() const noexcept
890 {
891 return errName;
892 }
893
894 const char* description() const noexcept
895 {
896 return errDesc;
897 }
898
899 const char* what() const noexcept
900 {
901 return errName;
902 }
903};
904
905} // namespace Common
906} // namespace openbmc_project
907} // namespace xyz
908
909
910namespace details
911{
912
913template <>
914struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Error::Timeout>
915{
916 using type = xyz::openbmc_project::Common::Timeout;
917};
918
919}
920
921namespace xyz
922{
923namespace openbmc_project
924{
925namespace Common
926{
927namespace _InvalidArgument
928{
929
930struct ARGUMENT_NAME
931{
932 static constexpr auto str = "ARGUMENT_NAME=%s";
933 static constexpr auto str_short = "ARGUMENT_NAME";
934 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
935 explicit constexpr ARGUMENT_NAME(const char* a) : _entry(entry(str, a)) {};
936 type _entry;
937};
938struct ARGUMENT_VALUE
939{
940 static constexpr auto str = "ARGUMENT_VALUE=%s";
941 static constexpr auto str_short = "ARGUMENT_VALUE";
942 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
943 explicit constexpr ARGUMENT_VALUE(const char* a) : _entry(entry(str, a)) {};
944 type _entry;
945};
946
947} // namespace _InvalidArgument
948
949struct InvalidArgument : public sdbusplus::exception_t
950{
951 static constexpr auto errName = "xyz.openbmc_project.Common.InvalidArgument";
952 static constexpr auto errDesc = "Invalid argument was given.";
953 static constexpr auto L = level::INFO;
954 using ARGUMENT_NAME = _InvalidArgument::ARGUMENT_NAME;
955 using ARGUMENT_VALUE = _InvalidArgument::ARGUMENT_VALUE;
956 using metadata_types = std::tuple<ARGUMENT_NAME, ARGUMENT_VALUE>;
957
958 const char* name() const noexcept
959 {
960 return errName;
961 }
962
963 const char* description() const noexcept
964 {
965 return errDesc;
966 }
967
968 const char* what() const noexcept
969 {
970 return errName;
971 }
972};
973
974} // namespace Common
975} // namespace openbmc_project
976} // namespace xyz
977
978
979namespace details
980{
981
982template <>
983struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument>
984{
985 using type = xyz::openbmc_project::Common::InvalidArgument;
986};
987
988}
989
990namespace xyz
991{
992namespace openbmc_project
993{
994namespace Common
995{
996namespace _InternalFailure
997{
998
999
1000} // namespace _InternalFailure
1001
1002struct InternalFailure : public sdbusplus::exception_t
1003{
1004 static constexpr auto errName = "xyz.openbmc_project.Common.InternalFailure";
1005 static constexpr auto errDesc = "The operation failed internally.";
1006 static constexpr auto L = level::ERR;
1007 using metadata_types = std::tuple<>;
1008
1009 const char* name() const noexcept
1010 {
1011 return errName;
1012 }
1013
1014 const char* description() const noexcept
1015 {
1016 return errDesc;
1017 }
1018
1019 const char* what() const noexcept
1020 {
1021 return errName;
1022 }
1023};
1024
1025} // namespace Common
1026} // namespace openbmc_project
1027} // namespace xyz
1028
1029
1030namespace details
1031{
1032
1033template <>
1034struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure>
1035{
1036 using type = xyz::openbmc_project::Common::InternalFailure;
1037};
1038
1039}
1040
Dhruvaraj Subhashchandran2de0cfa2017-04-25 07:26:39 -05001041
1042} // namespace logging
1043
1044} // namespace phosphor