Update PELs while parsing FRU
Severity of PEL needs to be updated as informational in case any
of the FRU collection fails for reason other than EEPROM or data
failure, for which the severity will be handled by the specific parser.
This is done as successful collection of a FRU other than system VPD
is not a mandatory condition to bring BMC to ready state.
In case of failure in the processing of pre action, to figure out what
failed in the flow, informational PEL is added while processing
pre-action tags.
No error in case the file is not found and pre-action was not required
as FRU can be actually absent.
Empty map is also not considered for logging PEL in worker as
respective parser should take care of any error and log PEL at their
end.
Change-Id: I4adf5be3adeb5ca556b1b4283e3036361793b108
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/vpd-manager/include/exceptions.hpp b/vpd-manager/include/exceptions.hpp
index 7109453..347e704 100644
--- a/vpd-manager/include/exceptions.hpp
+++ b/vpd-manager/include/exceptions.hpp
@@ -138,6 +138,11 @@
Exception(msg), m_jsonPath(path)
{}
+ /** @brief constructor
+ * @param[in] msg - Information w.r.t. exception.
+ */
+ JsonException(const std::string& msg) : Exception(msg) {}
+
/** @brief Json path getter method.
*
* @return - Json path