catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ice1ca68c7c753bb67a4d8a478399225fc1b0b1f5
diff --git a/image_manager_main.cpp b/image_manager_main.cpp
index 1aeb698..f4dc03f 100644
--- a/image_manager_main.cpp
+++ b/image_manager_main.cpp
@@ -29,7 +29,7 @@
bus.attach_event(loop, SD_EVENT_PRIORITY_NORMAL);
sd_event_loop(loop);
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
lg2::error("Error in event loop: {ERROR}", "ERROR", e);
return -1;
diff --git a/serialize.cpp b/serialize.cpp
index c471188..52c5ac5 100644
--- a/serialize.cpp
+++ b/serialize.cpp
@@ -74,7 +74,7 @@
iarchive(cereal::make_nvp(priorityName, priority));
return true;
}
- catch (cereal::Exception& e)
+ catch (const cereal::Exception& e)
{
fs::remove_all(path);
}
@@ -134,7 +134,7 @@
iarchive(cereal::make_nvp(purposeName, purpose));
return true;
}
- catch (cereal::Exception& e)
+ catch (const cereal::Exception& e)
{
fs::remove_all(path);
}
diff --git a/sync_manager_main.cpp b/sync_manager_main.cpp
index 271e67b..db269a9 100644
--- a/sync_manager_main.cpp
+++ b/sync_manager_main.cpp
@@ -31,7 +31,7 @@
bus.attach_event(loop, SD_EVENT_PRIORITY_NORMAL);
sd_event_loop(loop);
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
lg2::error("Error in event loop: {ERROR}", "ERROR", e);
sd_event_unref(loop);