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: I03198711b6d148e82106ca6ff809c25d814ad201
diff --git a/pldm.cpp b/pldm.cpp
index d22a73d..2552183 100644
--- a/pldm.cpp
+++ b/pldm.cpp
@@ -12,7 +12,6 @@
namespace pldm
{
-using sdbusplus::exception::SdBusError;
using namespace phosphor::logging;
void Interface::fetchOCCSensorInfo(const PdrList& pdrs,
@@ -87,7 +86,7 @@
auto responseMsg = bus.call(method);
responseMsg.read(pdrs);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("pldm: Failed to fetch the OCC state sensor PDRs",
entry("ERROR=%s", e.what()));
@@ -259,7 +258,7 @@
auto responseMsg = bus.call(method);
responseMsg.read(pdrs);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("pldm: Failed to fetch the OCC state effecter PDRs",
entry("ERROR=%s", e.what()));
@@ -298,7 +297,7 @@
auto reply = bus.call(method);
reply.read(instanceId);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("pldm: GetInstanceId returned error",
entry("ERROR=%s", e.what()));
diff --git a/powercap.cpp b/powercap.cpp
index 39c7416..e435096 100644
--- a/powercap.cpp
+++ b/powercap.cpp
@@ -45,7 +45,7 @@
return std::get<uint32_t>(pcap);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Failed to get PowerCap property",
entry("ERROR=%s", e.what()),
@@ -65,7 +65,7 @@
return std::get<bool>(pcapEnabled);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Failed to get PowerCapEnable property",
entry("ERROR=%s", e.what()),
diff --git a/utils.hpp b/utils.hpp
index b1da8c0..5e49f83 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -47,7 +47,7 @@
*
* @return The value of the property(type: variant)
*
- * @throw sdbusplus::exception::SdBusError when it fails
+ * @throw sdbusplus::exception::exception when it fails
*/
const PropertyValue getProperty(const std::string& objectPath,
const std::string& interface,