catch exceptions as const

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4447cb11880e36b44c8913e56c728ccd76d2044d
diff --git a/functions.cpp b/functions.cpp
index 98d8845..746a2a8 100644
--- a/functions.cpp
+++ b/functions.cpp
@@ -295,7 +295,7 @@
             name = iter["element_name"].get<std::string>();
             lid = iter["short_lid_name"].get<std::string>();
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {
             // Possibly the element or lid name field was not found
             log<level::ERR>("Error reading JSON field",
diff --git a/ubi/serialize.cpp b/ubi/serialize.cpp
index 2c31638..4aa492a 100644
--- a/ubi/serialize.cpp
+++ b/ubi/serialize.cpp
@@ -60,7 +60,7 @@
             varArchive(cereal::make_nvp("priority", priority));
             return true;
         }
-        catch (cereal::RapidJSONException& e)
+        catch (const cereal::RapidJSONException& e)
         {
             std::filesystem::remove(varPath);
         }
@@ -76,7 +76,7 @@
             rwArchive(cereal::make_nvp("priority", priority));
             return true;
         }
-        catch (cereal::RapidJSONException& e)
+        catch (const cereal::RapidJSONException& e)
         {
             std::filesystem::remove(rwPath);
         }