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: I9915c0207bbca91296548e7a1e707e499c3d7838
diff --git a/src/bmccontrolservices.cpp b/src/bmccontrolservices.cpp
index 418deb4..3ab1f81 100644
--- a/src/bmccontrolservices.cpp
+++ b/src/bmccontrolservices.cpp
@@ -64,7 +64,7 @@
serviceCfgMgr = ipmi::getService(*sdbusp, objectManagerIntf,
serviceConfigBasePath);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
serviceCfgMgr.clear();
phosphor::logging::log<phosphor::logging::level::ERR>(
@@ -157,7 +157,7 @@
}
}
}
- catch (sdbusplus::exception::SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
return ipmi::responseUnspecifiedError();
}
@@ -190,7 +190,7 @@
}
}
}
- catch (sdbusplus::exception::SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
return ipmi::responseUnspecifiedError();
}
diff --git a/src/bridgingcommands.cpp b/src/bridgingcommands.cpp
index b44edc3..0157f42 100644
--- a/src/bridgingcommands.cpp
+++ b/src/bridgingcommands.cpp
@@ -592,7 +592,7 @@
getMsgFlagsRes.set(getMsgFlagWatchdogPreTimeOutBit);
}
}
- catch (sdbusplus::exception::SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(
"ipmiAppGetMessageFlags, dbus call exception");
@@ -664,7 +664,7 @@
ipmi::setDbusProperty(*dbus, wdtService, wdtObjPath, wdtInterface,
wdtInterruptFlagProp, false);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(
"ipmiAppClearMessageFlags: can't Clear/Set "
diff --git a/src/chassiscommands.cpp b/src/chassiscommands.cpp
index 2363877..94bd6a3 100644
--- a/src/chassiscommands.cpp
+++ b/src/chassiscommands.cpp
@@ -101,7 +101,7 @@
getDbusProperty(*bus, service, objName, ledInterface, ledProp);
state = std::get<bool>(enabled);
}
- catch (sdbusplus::exception::SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
log<level::ERR>("Fail to get property", entry("PATH=%s", objName),
entry("ERROR=%s", e.what()));
@@ -339,7 +339,7 @@
*busp, service, buttonPath, buttonIntf, "ButtonMasked");
buttonDisabled = std::get<bool>(disabled);
}
- catch (sdbusplus::exception::SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
log<level::ERR>("Fail to get button disabled property",
entry("PATH=%s", buttonPath.c_str()),
diff --git a/src/manufacturingcommands.cpp b/src/manufacturingcommands.cpp
index 9f677b1..2417955 100644
--- a/src/manufacturingcommands.cpp
+++ b/src/manufacturingcommands.cpp
@@ -227,7 +227,7 @@
*reply = ipmi::getDbusProperty(*getSdBus(), service, path, interface,
propertyName);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
phosphor::logging::log<phosphor::logging::level::INFO>(
"ERROR: getProperty");
@@ -248,7 +248,7 @@
ipmi::setDbusProperty(*getSdBus(), service, path, interface,
propertyName, value);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
phosphor::logging::log<phosphor::logging::level::INFO>(
"ERROR: setProperty");
@@ -269,7 +269,7 @@
method.append(pidControlService, "replace");
auto reply = dbus->call(method);
}
- catch (const sdbusplus::exception::SdBusError& e)
+ catch (const sdbusplus::exception::exception& e)
{
phosphor::logging::log<phosphor::logging::level::INFO>(
"ERROR: phosphor-pid-control service start or stop failed");
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 9fb4892..76d10a5 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -1316,7 +1316,7 @@
sdbusplus::xyz::openbmc_project::Led::server::Physical::
convertActionFromString(strState));
}
- catch (sdbusplus::exception::SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
return -1;
@@ -3011,7 +3011,7 @@
return ipmi::responseResponseError();
}
}
- catch (sdbusplus::exception::SdBusError& e)
+ catch (sdbusplus::exception::exception& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
return ipmi::responseResponseError();