summaryrefslogtreecommitdiffstats
path: root/item_updater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'item_updater.cpp')
-rw-r--r--item_updater.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/item_updater.cpp b/item_updater.cpp
index 22734ef..e2d0f94 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -464,20 +464,23 @@ void ItemUpdater::setBMCInventoryPath()
std::vector<std::string> filter = {BMC_INVENTORY_INTERFACE};
mapperCall.append(filter);
- auto response = bus.call(mapperCall);
- if (response.is_method_error())
+ try
{
- log<level::ERR>("Error in mapper GetSubTreePath");
- return;
- }
+ auto response = bus.call(mapperCall);
- using ObjectPaths = std::vector<std::string>;
- ObjectPaths result;
- response.read(result);
+ using ObjectPaths = std::vector<std::string>;
+ ObjectPaths result;
+ response.read(result);
- if (!result.empty())
+ if (!result.empty())
+ {
+ bmcInventoryPath = result.front();
+ }
+ }
+ catch (const sdbusplus::exception::SdBusError& e)
{
- bmcInventoryPath = result.front();
+ log<level::ERR>("Error in mapper GetSubTreePath");
+ return;
}
return;
OpenPOWER on IntegriCloud