exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus.
Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ifa2391f2f582cb2cf16dc85012a05e1f4f6659fd
diff --git a/discover_system_state.cpp b/discover_system_state.cpp
index 88fa4ab..d440c00 100644
--- a/discover_system_state.cpp
+++ b/discover_system_state.cpp
@@ -27,7 +27,6 @@
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
using namespace sdbusplus::xyz::openbmc_project::Control::Power::server;
-using sdbusplus::exception::SdBusError;
constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper";
constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper";
@@ -57,7 +56,7 @@
throw std::runtime_error("Error reading mapper response");
}
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Error in mapper call", entry("ERROR=%s", e.what()),
entry("PATH=%s", path.c_str()),
@@ -84,7 +83,7 @@
auto reply = bus.call(method);
reply.read(property);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Error in property Get", entry("ERROR=%s", e.what()),
entry("PROPERTY=%s", propertyName.c_str()));
@@ -221,7 +220,7 @@
hostReqState);
}
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Error in PowerRestorePolicy Get",
entry("ERROR=%s", e.what()));