summaryrefslogtreecommitdiffstats
path: root/control/manager.cpp
diff options
context:
space:
mode:
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