New error type for generic VPD parse errors

VPD parsing can be failed for both data and ECC errors for different
records for a single file. So new generic error is introduced for
exception occurred during VPD parsing.

Change-Id: Ie7a77a84cd304372e6273075f44853ff65f6383b
Signed-off-by: Rekha Aparna <vrekhaaparna@ibm.com>
diff --git a/vpd-manager/include/types.hpp b/vpd-manager/include/types.hpp
index cffab81..1ea8f09 100644
--- a/vpd-manager/include/types.hpp
+++ b/vpd-manager/include/types.hpp
@@ -188,7 +188,8 @@
     SystemTypeMismatch,
     UndefinedError,
     UnknownSystemSettings,
-    FirmwareError
+    FirmwareError,
+    VpdParseError /* Should be used in case of any generic VPD parsing error. */
 };
 
 using InventoryCalloutData = std::tuple<std::string, CalloutPriority>;
diff --git a/vpd-manager/src/event_logger.cpp b/vpd-manager/src/event_logger.cpp
index 6b91dc8..508832f 100644
--- a/vpd-manager/src/event_logger.cpp
+++ b/vpd-manager/src/event_logger.cpp
@@ -55,7 +55,8 @@
          "com.ibm.VPD.Error.SystemTypeMismatch"},
         {types::ErrorType::UnknownSystemSettings,
          "com.ibm.VPD.Error.UnknownSystemSettings"},
-        {types::ErrorType::FirmwareError, "com.ibm.VPD.Error.FirmwareError"}};
+        {types::ErrorType::FirmwareError, "com.ibm.VPD.Error.FirmwareError"},
+        {types::ErrorType::VpdParseError, "com.ibm.VPD.Error.VPDParseError"}};
 
 const std::unordered_map<types::CalloutPriority, std::string>
     EventLogger::m_priorityMap = {
diff --git a/vpd-manager/src/ipz_parser.cpp b/vpd-manager/src/ipz_parser.cpp
index 7b19d22..8210ed3 100644
--- a/vpd-manager/src/ipz_parser.cpp
+++ b/vpd-manager/src/ipz_parser.cpp
@@ -843,7 +843,7 @@
         // Log a Predictive PEL, including names and respective error messages
         // of all invalid records
         EventLogger::createSyncPelWithInvCallOut(
-            types::ErrorType::EccCheckFailed, types::SeverityType::Warning,
+            types::ErrorType::VpdParseError, types::SeverityType::Warning,
             __FILE__, __FUNCTION__, constants::VALUE_0,
             std::string(
                 "Check failed for record(s) while parsing VPD. Check user data for reason and list of failed record(s). Re-program VPD."),