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: I518f6dd2ffb3f238d4ecb47fa1198c8e23665440
diff --git a/src/button_handler.cpp b/src/button_handler.cpp
index 7223108..6731e0f 100644
--- a/src/button_handler.cpp
+++ b/src/button_handler.cpp
@@ -14,7 +14,6 @@
namespace sdbusRule = sdbusplus::bus::match::rules;
using namespace sdbusplus::xyz::openbmc_project::State::server;
using namespace phosphor::logging;
-using sdbusplus::exception::SdBusError;
constexpr auto propertyIface = "org.freedesktop.DBus.Properties";
constexpr auto chassisIface = "xyz.openbmc_project.State.Chassis";
@@ -55,7 +54,7 @@
std::placeholders::_1));
}
}
- catch (SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
// The button wasn't implemented
}
@@ -74,7 +73,7 @@
std::placeholders::_1));
}
}
- catch (SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
// The button wasn't implemented
}
@@ -93,7 +92,7 @@
std::placeholders::_1));
}
}
- catch (SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
// The button wasn't implemented
}
@@ -150,7 +149,7 @@
bus.call(method);
}
- catch (SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
log<level::ERR>("Failed power state change on a power button press",
entry("ERROR=%s", e.what()));
@@ -180,7 +179,7 @@
bus.call(method);
}
- catch (SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
log<level::ERR>("Failed powering off on long power button press",
entry("ERROR=%s", e.what()));
@@ -210,7 +209,7 @@
bus.call(method);
}
- catch (SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
log<level::ERR>("Failed power state change on a reset button press",
entry("ERROR=%s", e.what()));
@@ -253,7 +252,7 @@
method.append(ledGroupIface, "Asserted", state);
result = bus.call(method);
}
- catch (SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
log<level::ERR>("Error toggling ID LED group on ID button press",
entry("ERROR=%s", e.what()));