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: Ia432ec5539a6af3c761dfbb86916464de5455149
diff --git a/control/fan.cpp b/control/fan.cpp
index 7f8f21f..e067205 100644
--- a/control/fan.cpp
+++ b/control/fan.cpp
@@ -66,7 +66,7 @@
_bus, sensor.second, sensor.first, _interface,
FAN_TARGET_PROPERTY, std::move(value));
}
- catch (const sdbusplus::exception::SdBusError&)
+ catch (const sdbusplus::exception::exception&)
{
throw util::DBusPropertyError{"DBus set property failed",
sensor.second, sensor.first,
diff --git a/control/functor.hpp b/control/functor.hpp
index f24d219..9f81fc5 100644
--- a/control/functor.hpp
+++ b/control/functor.hpp
@@ -137,7 +137,7 @@
auto val = zone.getPropertyByName<T>(_path, _intf, _prop);
_handler(zone, _path, _intf, _prop, std::forward<T>(val));
}
- catch (const sdbusplus::exception::SdBusError&)
+ catch (const sdbusplus::exception::exception&)
{
// Property will not be used unless a property changed
// signal message is received for this property.
@@ -168,7 +168,7 @@
auto val = zone.getPropertyByName<T>(path, intf, prop);
handler(zone, path, intf, prop, std::forward<T>(val));
}
- catch (const sdbusplus::exception::SdBusError&)
+ catch (const sdbusplus::exception::exception&)
{
// Property value not sent to handler
}
diff --git a/control/json/fan.cpp b/control/json/fan.cpp
index 673859a..3641279 100644
--- a/control/json/fan.cpp
+++ b/control/json/fan.cpp
@@ -103,7 +103,7 @@
_bus, sensor.second, sensor.first, _interface,
FAN_TARGET_PROPERTY, std::move(value));
}
- catch (const sdbusplus::exception::SdBusError&)
+ catch (const sdbusplus::exception::exception&)
{
throw util::DBusPropertyError{
fmt::format("Failed to set target for fan {}", _name).c_str(),
diff --git a/sdbusplus.hpp b/sdbusplus.hpp
index 94db9dd..6787f49 100644
--- a/sdbusplus.hpp
+++ b/sdbusplus.hpp
@@ -137,7 +137,7 @@
}
return respMsg;
}
- catch (const sdbusplus::exception::SdBusError&)
+ catch (const sdbusplus::exception::exception&)
{
throw DBusMethodError{busName, path, interface, method};
}