catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic8e6ade739bd5ea6e79cac6b9bb2b182748e10c8
diff --git a/extensions/openpower-pels/repository.cpp b/extensions/openpower-pels/repository.cpp
index 6b9408f..1e9bd6f 100644
--- a/extensions/openpower-pels/repository.cpp
+++ b/extensions/openpower-pels/repository.cpp
@@ -105,7 +105,7 @@
{
write(pel, dirEntry.path());
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
log<level::ERR>(
"Failed to save PEL after updating host state",
@@ -138,7 +138,7 @@
fs::remove(dirEntry.path());
}
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
log<level::ERR>("Hit exception while restoring PEL File",
entry("FILENAME=%s", dirEntry.path().c_str()),
@@ -334,7 +334,7 @@
break;
}
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
log<level::ERR>("Repository::for_each function exception",
entry("ERROR=%s", e.what()));
@@ -350,7 +350,7 @@
{
func(pel);
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
log<level::ERR>("PEL Repository add callback exception",
entry("NAME=%s", name.c_str()),
@@ -367,7 +367,7 @@
{
func(id);
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
log<level::ERR>("PEL Repository delete callback exception",
entry("NAME=%s", name.c_str()),
@@ -406,7 +406,7 @@
attr->second.hostState = state;
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
log<level::ERR>("Unable to update PEL host transmission state",
entry("PATH=%s", attr->second.path.c_str()),
@@ -433,7 +433,7 @@
attr->second.hmcState = state;
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
log<level::ERR>("Unable to update PEL HMC transmission state",
entry("PATH=%s", attr->second.path.c_str()),