catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia4086e77ad205e9a6a73a6ca570036818e3069fe
diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index e7ee3ad..6586fff 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -106,7 +106,7 @@
auto reply = dbus.call(managedObj);
reply.read(managedObjects);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
phosphor::logging::log<phosphor::logging::level::ERR>(
"Error getting managed objects from connection",
@@ -142,7 +142,7 @@
{
sdbusplus::message::message writeFruResp = dbus.call(writeFru);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
// todo: log sel?
phosphor::logging::log<phosphor::logging::level::ERR>(
@@ -185,7 +185,7 @@
sdbusplus::message::message resp = dbus.call(getObjects);
resp.read(frus);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
phosphor::logging::log<phosphor::logging::level::ERR>(
"replaceCacheFru: error getting managed objects");
@@ -269,7 +269,7 @@
sdbusplus::message::message getRawResp = dbus.call(getRawFru);
getRawResp.read(fruCache);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
lastDevId = 0xFF;
cacheBus = 0xFF;
@@ -456,7 +456,7 @@
sdbusplus::message::message resp = dbus.call(getObjects);
resp.read(frus);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
return IPMI_CC_RESPONSE_ERROR;
}