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: I3b5d83511afdf17b2911502279087e57a59b9945
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index 5f44818..a0fbcb7 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -623,7 +623,7 @@
return ccUnspecifiedError;
}
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Exception: Network interface does not exist");
return ccInvalidFieldRequest;
@@ -1295,7 +1295,7 @@
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>("set-property failed",
entry("SERVICE=%s", service.c_str()),
@@ -1325,7 +1325,7 @@
auto reply = bus.call(method);
reply.read(value);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>("get-property failed",
entry("SERVICE=%s", service.c_str()),
@@ -1370,7 +1370,7 @@
"exception: Network interface does not exist");
continue;
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>(
"exception: Network interface does not exist");
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index 452be90..6ae90fc 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -162,7 +162,7 @@
method.append(interface, property, value);
bus.call(method);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Failed to set property",
entry("PROPERTY=%s", property.c_str()),
@@ -183,7 +183,7 @@
userMgmtService =
ipmi::getUserService(bus, userMgrInterface, userMgrObjBasePath);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
userMgmtService.clear();
}
@@ -413,7 +413,7 @@
auto reply = bus.call(method);
reply.read(properties);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>(
"Failed to excute method",
@@ -587,7 +587,7 @@
auto reply = bus.call(method);
reply.read(properties);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::ERR>("Failed to excute method",
entry("METHOD=%s", getSubTreeMethod),
@@ -1032,7 +1032,7 @@
deleteUserInterface, deleteUserMethod);
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", deleteUserMethod),
@@ -1056,7 +1056,7 @@
method.append(userName.c_str(), availableGroups, "", false);
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", createUserMethod),
@@ -1080,7 +1080,7 @@
method.append(oldUser.c_str(), userName.c_str());
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", renameUserMethod),
@@ -1530,7 +1530,7 @@
auto reply = bus.call(method);
reply.read(properties);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", getAllPropertiesMethod),
@@ -1671,7 +1671,7 @@
auto reply = bus.call(method);
reply.read(managedObjs);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", getSubTreeMethod),