catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iee4354d96981eac216425c71668f8eb72e146977
diff --git a/snmp_conf_manager.cpp b/snmp_conf_manager.cpp
index f7edfe0..73e2544 100644
--- a/snmp_conf_manager.cpp
+++ b/snmp_conf_manager.cpp
@@ -41,7 +41,7 @@
// just to check whether given address is valid or not.
resolveAddress(address);
}
- catch (InternalFailure& e)
+ catch (const InternalFailure& e)
{
log<level::ERR>("Not a valid address"),
entry("ADDRESS=%s", address.c_str());
diff --git a/snmp_serialize.cpp b/snmp_serialize.cpp
index 2a04109..1b47d4e 100644
--- a/snmp_serialize.cpp
+++ b/snmp_serialize.cpp
@@ -82,7 +82,7 @@
}
return false;
}
- catch (cereal::Exception& e)
+ catch (const cereal::Exception& e)
{
log<level::ERR>(e.what());
std::error_code ec;