Add custom exception class and type
The commit adds few custom exception class and type so that exact
exception can be thrown for a failure.
This is required to detect the type of failure and log appropriate PEL
for the error. With just throwing runtime error in most of the cases it
is not possible to detect the reason for failure at catching point.
Change-Id: I672c3c5fd6d289b8e6943b9a22836acfb9e6b04b
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/vpd-manager/src/event_logger.cpp b/vpd-manager/src/event_logger.cpp
index 11861d1..eb2f470 100644
--- a/vpd-manager/src/event_logger.cpp
+++ b/vpd-manager/src/event_logger.cpp
@@ -39,7 +39,10 @@
"com.ibm.VPD.Error.UnknownSystemType"},
{types::ErrorType::EssentialFru,
"com.ibm.VPD.Error.RequiredFRUMissing"},
- {types::ErrorType::GpioError, "com.ibm.VPD.Error.GPIOError"}};
+ {types::ErrorType::GpioError, "com.ibm.VPD.Error.GPIOError"},
+ {types::ErrorType::InternalFailure,
+ "xyz.openbmc_project.Common.Error.InternalFailure"},
+ {types::ErrorType::FruMissing, "com.ibm.VPD.Error.RequiredFRUMissing"}};
const std::unordered_map<types::CalloutPriority, std::string>
EventLogger::m_priorityMap = {