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: I3beb227f7fac887190c15084e6b112ae1e1e11c5
diff --git a/extensions/openpower-pels/data_interface.cpp b/extensions/openpower-pels/data_interface.cpp
index 0365b8b..f8b701f 100644
--- a/extensions/openpower-pels/data_interface.cpp
+++ b/extensions/openpower-pels/data_interface.cpp
@@ -83,7 +83,6 @@
} // namespace interface
using namespace sdbusplus::xyz::openbmc_project::State::Boot::server;
-using sdbusplus::exception::SdBusError;
using namespace phosphor::logging;
std::pair<std::string, std::string>
diff --git a/extensions/openpower-pels/dbus_watcher.hpp b/extensions/openpower-pels/dbus_watcher.hpp
index c674abb..54cf6d4 100644
--- a/extensions/openpower-pels/dbus_watcher.hpp
+++ b/extensions/openpower-pels/dbus_watcher.hpp
@@ -7,7 +7,6 @@
namespace openpower::pels
{
-using sdbusplus::exception::SdBusError;
namespace match_rules = sdbusplus::bus::match::rules;
/**
@@ -120,7 +119,7 @@
{
read(dataIface, service);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
// Path doesn't exist now
}
@@ -300,7 +299,7 @@
{
read(dataIface);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
// Path doesn't exist now
}
diff --git a/extensions/openpower-pels/src.cpp b/extensions/openpower-pels/src.cpp
index a6498af..6c6a2d4 100644
--- a/extensions/openpower-pels/src.cpp
+++ b/extensions/openpower-pels/src.cpp
@@ -861,7 +861,7 @@
callout =
std::make_unique<src::Callout>(p, locCode, fn, ccin, sn, mrus);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
std::string msg =
"No VPD found for " + inventoryPath + ": " + e.what();
@@ -872,7 +872,7 @@
CalloutPriority::high, locCode, fn, ccin, sn, mrus);
}
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
std::string msg = "Could not get location code for " + inventoryPath +
": " + e.what();
diff --git a/extensions/openpower-pels/tools/peltool.cpp b/extensions/openpower-pels/tools/peltool.cpp
index 6dc2ef0..5a2abf7 100644
--- a/extensions/openpower-pels/tools/peltool.cpp
+++ b/extensions/openpower-pels/tools/peltool.cpp
@@ -38,7 +38,6 @@
namespace fs = std::filesystem;
using namespace phosphor::logging;
using namespace openpower::pels;
-using sdbusplus::exception::SdBusError;
namespace file_error = sdbusplus::xyz::openbmc_project::Common::File::Error;
namespace message = openpower::pels::message;
namespace pv = openpower::pels::pel_values;
diff --git a/log_manager.cpp b/log_manager.cpp
index 29f5955..c380429 100644
--- a/log_manager.cpp
+++ b/log_manager.cpp
@@ -32,7 +32,6 @@
#include <xyz/openbmc_project/State/Host/server.hpp>
using namespace std::chrono;
-using sdbusplus::exception::SdBusError;
extern const std::map<
phosphor::logging::metadata::Metadata,
std::function<phosphor::logging::metadata::associations::Type>>
@@ -278,7 +277,7 @@
auto reply = this->busLog.call(method);
reply.read(property);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
lg2::error("Error reading QuiesceOnHwError property: {ERROR}", "ERROR",
e);
@@ -352,7 +351,7 @@
auto reply = this->busLog.call(method);
reply.read(property);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
// Quiescing the host is a "best effort" type function. If unable to
// read the host state or it comes back empty, just return.