summaryrefslogtreecommitdiffstats
path: root/control/manager.cpp
diff options
context:
space:
mode:
authorDinesh Chinari <chinari@us.ibm.com>2017-06-26 23:26:50 -0500
committerDinesh Chinari <chinari@us.ibm.com>2017-06-28 08:16:18 -0500
commit618027abcf491b0b58f71bfe2b48c55dfb86462e (patch)
tree358d628f65ba2b426210d837681baa287b869603 /control/manager.cpp
parentbb12c926dca2215bccfbd270da11f0c2b5822878 (diff)
downloadphosphor-fan-presence-618027abcf491b0b58f71bfe2b48c55dfb86462e.tar.gz
phosphor-fan-presence-618027abcf491b0b58f71bfe2b48c55dfb86462e.zip
phosphor-fan-presence elog error exception.
Implemented elog exception for phosphor fan presence, replacing runtime_errors. Change-Id: I70465060838b2cbaeadccf84ed5924e222ac59e3 Signed-off-by: Dinesh Chinari <chinari@us.ibm.com>
Diffstat (limited to 'control/manager.cpp')
-rw-r--r--control/manager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/control/manager.cpp b/control/manager.cpp
index c3c1226..bbd0f5e 100644
--- a/control/manager.cpp
+++ b/control/manager.cpp
@@ -15,6 +15,9 @@
*/
#include <algorithm>
#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/elog-errors.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
#include <unistd.h>
#include "manager.hpp"
#include "utility.hpp"
@@ -69,8 +72,8 @@ void getProperty(sdbusplus::bus::bus& bus,
if (reply.is_method_error())
{
- throw std::runtime_error(
- "Error in call response for retrieving property");
+ log<level::ERR>("Error in call response for retrieving property");
+ elog<InternalFailure>();
}
reply.read(property);
value = sdbusplus::message::variant_ns::get<T>(property);
@@ -179,9 +182,8 @@ void Manager::startFanControlReadyTarget()
auto response = _bus.call(method);
if (response.is_method_error())
{
- //TODO openbmc/openbmc#1555 create an elog
log<level::ERR>("Failed to start fan control ready target");
- throw std::runtime_error("Failed to start fan control ready target");
+ elog<InternalFailure>();
}
}
OpenPOWER on IntegriCloud