remove is_method_error call
An `is_method_error` is not appropriate after an sdbus `call` since
`call` will always throw an exception. Remove the pointless call
and instead catch the exception.
Change-Id: I9b5da6b36efaf9b1eddf15270a35690b66fed607
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/ext_interface.cpp b/ext_interface.cpp
index 872b677..1e25b2d 100644
--- a/ext_interface.cpp
+++ b/ext_interface.cpp
@@ -39,12 +39,6 @@
auto mapperResponseMsg = bus.call(mapper);
- if (mapperResponseMsg.is_method_error())
- {
- // TODO openbmc/openbmc#851 - Once available, throw returned error
- throw std::runtime_error("ERROR in mapper call");
- }
-
std::map<std::string, std::vector<std::string>> mapperResponse;
mapperResponseMsg.read(mapperResponse);
@@ -69,12 +63,7 @@
method.append(REBOOTCOUNTER_INTERFACE, "AttemptsLeft");
auto reply = bus.call(method);
- if (reply.is_method_error())
- {
- log<level::ERR>("Error in BOOTCOUNT getValue");
- // TODO openbmc/openbmc#851 - Once available, throw returned error
- throw std::runtime_error("ERROR in reading BOOTCOUNT");
- }
+
std::variant<uint32_t> rebootCount;
reply.read(rebootCount);