catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id11e5c601ff495cd61abd3c35e6558e446e8a7d1
diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
index 57c7b78..d59aa16 100644
--- a/fault-monitor/fru-fault-monitor.cpp
+++ b/fault-monitor/fru-fault-monitor.cpp
@@ -92,12 +92,12 @@
groups.pop_back();
service = getService(bus, groups);
}
- catch (MethodErr& e)
+ catch (const MethodErr& e)
{
commit<MethodErr>();
return;
}
- catch (ObjectNotFoundErr& e)
+ catch (const ObjectNotFoundErr& e)
{
commit<ObjectNotFoundErr>();
return;
diff --git a/serialize.cpp b/serialize.cpp
index 7bde9b7..5982093 100644
--- a/serialize.cpp
+++ b/serialize.cpp
@@ -68,7 +68,7 @@
cereal::JSONInputArchive iarchive(is);
iarchive(savedGroups);
}
- catch (cereal::Exception& e)
+ catch (const cereal::Exception& e)
{
lg2::error("Failed to restore groups, ERROR = {ERROR}", "ERROR", e);
fs::remove(path);