Remove deprecated is_method_error code
The is_method_error() function is no longer needed, instead a
try-catch block should be used instead.
Reference:
https://lists.ozlabs.org/pipermail/openbmc/2018-October/013696.html,
Change-Id: I1919ea33fc18be2b8afd51fb1f85ddef15041e7c
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/activation.cpp b/activation.cpp
index a938b8b..73acc3d 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -205,9 +205,11 @@
auto method = this->bus.new_method_call(VERSION_BUSNAME, path.c_str(),
"xyz.openbmc_project.Object.Delete",
"Delete");
- auto mapperResponseMsg = bus.call(method);
- // Check that the bus call didn't result in an error
- if (mapperResponseMsg.is_method_error())
+ try
+ {
+ bus.call_noreply(method);
+ }
+ catch (const SdBusError& e)
{
log<level::ERR>("Error in Deleting image from image manager",
entry("VERSIONPATH=%s", path.c_str()));