Remove is_method_error method

Remove the usage of is_method_error()[1], and add try-catch to handle
D-Bus exceptions around mapper call.

[1]https://github.com/openbmc/sdbusplus/commit/079fb85a398d90800935e3985bb1266a7530a26e#diff-945669e8bd9cab4ecc83a574a732921281b2c79eb8bba65efff11736ad18f92bR237-R240

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I85192219c1c34cf5fd6c6aca06a8b207d7e06697
diff --git a/softoff/softoff.cpp b/softoff/softoff.cpp
index 0c2c9bd..7dcde4c 100644
--- a/softoff/softoff.cpp
+++ b/softoff/softoff.cpp
@@ -41,16 +41,17 @@
                                       CONTROL_HOST_BUSNAME, "Execute");
 
     method.append(convertForMessage(Host::Command::SoftOff).c_str());
-
-    auto reply = bus.call(method);
-    if (reply.is_method_error())
+    try
     {
-        log<level::ERR>("Error in call to control host Execute");
+        auto reply = bus.call(method);
+    }
+    catch (const std::exception& e)
+    {
+        log<level::ERR>("Error in call to control host Execute",
+                        entry("ERROR=%s", e.what()));
         // TODO openbmc/openbmc#851 - Once available, throw returned error
         throw std::runtime_error("Error in call to control host Execute");
     }
-
-    return;
 }
 
 // Function called on host control signals