diff options
author | Dinesh Chinari <chinari@us.ibm.com> | 2017-06-26 23:26:50 -0500 |
---|---|---|
committer | Dinesh Chinari <chinari@us.ibm.com> | 2017-06-28 08:16:18 -0500 |
commit | 618027abcf491b0b58f71bfe2b48c55dfb86462e (patch) | |
tree | 358d628f65ba2b426210d837681baa287b869603 /presence | |
parent | bb12c926dca2215bccfbd270da11f0c2b5822878 (diff) | |
download | phosphor-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 'presence')
-rw-r--r-- | presence/Makefile.am | 6 | ||||
-rw-r--r-- | presence/fan_enclosure.cpp | 10 |
2 files changed, 5 insertions, 11 deletions
diff --git a/presence/Makefile.am b/presence/Makefile.am index b56ed4e..0f7e7dd 100644 --- a/presence/Makefile.am +++ b/presence/Makefile.am @@ -14,10 +14,12 @@ nodist_phosphor_fan_presence_tach_SOURCES = \ phosphor_fan_presence_tach_LDADD = \ $(top_builddir)/libfan.la \ $(SDBUSPLUS_LIBS) \ - $(PHOSPHOR_LOGGING_LIBS) + $(PHOSPHOR_LOGGING_LIBS) \ + ${PHOSPHOR_DBUS_INTERFACES_LIBS} phosphor_fan_presence_tach_CXXFLAGS = \ $(SDBUSPLUS_CFLAGS) \ - $(PHOSPHOR_LOGGING_CFLAGS) + $(PHOSPHOR_LOGGING_CFLAGS) \ + ${PHOSPHOR_DBUS_INTERFACES_CFLAGS} BUILT_SOURCES = fan_detect_defs.cpp diff --git a/presence/fan_enclosure.cpp b/presence/fan_enclosure.cpp index ca97c07..7b412bd 100644 --- a/presence/fan_enclosure.cpp +++ b/presence/fan_enclosure.cpp @@ -67,15 +67,7 @@ void FanEnclosure::updInventory() ObjectMap invObj = getObjectMap(curPresState); // Get inventory manager service name from mapper std::string invService; - try - { - invService = phosphor::fan::util::getInvService(bus); - } - catch (const std::runtime_error& err) - { - log<level::ERR>(err.what()); - return; - } + invService = phosphor::fan::util::getInvService(bus); // Update inventory for this fan auto invMsg = bus.new_method_call(invService.c_str(), INVENTORY_PATH, |