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: I25679cac0b64183f7b8508edb21609d64334e319
diff --git a/activation.cpp b/activation.cpp
index 75a1b3a..6029f33 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -31,7 +31,6 @@
PHOSPHOR_LOG2_USING;
using namespace phosphor::logging;
-using sdbusplus::exception::SdBusError;
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
@@ -47,7 +46,7 @@
{
this->bus.call_noreply(method);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
if (e.name() != nullptr &&
strcmp("org.freedesktop.systemd1.AlreadySubscribed", e.name()) == 0)
@@ -73,7 +72,7 @@
{
this->bus.call_noreply(method);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
error("Error unsubscribing from systemd signals: {ERROR}", "ERROR", e);
}
@@ -239,7 +238,7 @@
{
bus.call_noreply(method);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
error("Error deleting image ({PATH}) from image manager: {ERROR}",
"PATH", path, "ERROR", e);
@@ -374,7 +373,7 @@
return true;
}
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
error("Error in getting ApplyTime: {ERROR}", "ERROR", e);
}
@@ -393,7 +392,7 @@
{
auto reply = bus.call(method);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
error("Error in trying to upgrade Host Bios: {ERROR}", "ERROR", e);
report<InternalFailure>();
@@ -460,7 +459,7 @@
{
auto reply = bus.call(method);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
alert("Error in trying to reboot the BMC. The BMC needs to be manually "
"rebooted to complete the image activation. {ERROR}",
diff --git a/item_updater.cpp b/item_updater.cpp
index 6580de0..b6464f6 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -578,7 +578,7 @@
bmcInventoryPath = result.front();
}
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
error("Error in mapper GetSubTreePath: {ERROR}", "ERROR", e);
return;
diff --git a/ubi/item_updater_helper.cpp b/ubi/item_updater_helper.cpp
index f1dec08..92c8e84 100644
--- a/ubi/item_updater_helper.cpp
+++ b/ubi/item_updater_helper.cpp
@@ -15,7 +15,6 @@
{
PHOSPHOR_LOG2_USING;
-using sdbusplus::exception::SdBusError;
void Helper::setEntry(const std::string& entryId, uint8_t value)
{
@@ -75,7 +74,7 @@
{
bus.call_noreply(method);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
error("Failed to update u-boot env variables", "VERSIONID", versionId);
}
@@ -92,7 +91,7 @@
{
bus.call_noreply(method);
}
- catch (const SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
error("Failed to copy U-Boot to alternate chip: {ERROR}", "ERROR", e);
}
diff --git a/utils.cpp b/utils.cpp
index e2c0f02..38de0e4 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -32,7 +32,7 @@
return std::string{};
}
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
error("Error in mapper method call for ({PATH}, {INTERFACE}: {ERROR}",
"ERROR", e, "PATH", path, "INTERFACE", interface);