Replacing runtime exceptions with elog
Resolves openbmc/openbmc#1323
Change-Id: Ia93d1f0036341c26fdc6c5e3133d4a05346090be
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/proc_control.cpp b/proc_control.cpp
index a86b354..aceb6d6 100644
--- a/proc_control.cpp
+++ b/proc_control.cpp
@@ -20,6 +20,7 @@
#include <phosphor-logging/elog.hpp>
#include "registration.hpp"
#include "elog-errors.hpp"
+#include <xyz/openbmc_project/Common/error.hpp>
using namespace openpower::util;
@@ -79,6 +80,11 @@
commit<org::open_power::Proc::CFAM::ReadFailure>();
return -1;
}
+ catch (sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument& e)
+ {
+ commit<sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument>();
+ return -1;
+ }
return 0;
}