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: I086be1ec495f58a68ae087441dee3d65cbc630ac
diff --git a/common_utility.cpp b/common_utility.cpp
index 5a12b6c..aeb7c1b 100644
--- a/common_utility.cpp
+++ b/common_utility.cpp
@@ -30,7 +30,7 @@
auto reply = bus.call(mapper);
reply.read(response);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("D-Bus call exception",
entry("OBJPATH=%s", mapperObjectPath),
diff --git a/ibm_vpd_app.cpp b/ibm_vpd_app.cpp
index 2501186..684b7a7 100644
--- a/ibm_vpd_app.cpp
+++ b/ibm_vpd_app.cpp
@@ -583,7 +583,7 @@
properties.append(data);
bus.call(properties);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
std::string what =
"VPDManager WriteKeyword api failed for inventory path " +
diff --git a/ibm_vpd_utils.cpp b/ibm_vpd_utils.cpp
index 2413a3d..9b5530e 100644
--- a/ibm_vpd_utils.cpp
+++ b/ibm_vpd_utils.cpp
@@ -68,7 +68,7 @@
response.read(result);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Error in mapper GetSubTree",
entry("ERROR=%s", e.what()));
@@ -178,7 +178,7 @@
method.append(errIntf, pelSeverity, additionalData);
auto resp = bus.call(method);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
throw std::runtime_error(
"Error in invoking D-Bus logging create interface to register PEL");
diff --git a/vpd_tool_impl.cpp b/vpd_tool_impl.cpp
index c9b0bb7..5d35f03 100644
--- a/vpd_tool_impl.cpp
+++ b/vpd_tool_impl.cpp
@@ -10,7 +10,6 @@
#include <vector>
using namespace std;
-using sdbusplus::exception::SdBusError;
using namespace openpower::vpd;
using namespace inventory;
using namespace openpower::vpd::manager::editor;
@@ -152,7 +151,7 @@
kwVal.emplace(kw, printableVal);
}
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
if (string(e.name()) ==
string("org.freedesktop.DBus.Error.UnknownObject"))
@@ -187,7 +186,7 @@
output.emplace(kw, *str);
}
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
if (std::string(e.name()) ==
std::string("org.freedesktop.DBus.Error.UnknownObject"))