catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic2b49715c7b81ac5bcfc12ff2d3b4c593cd95ce7
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index a0fbcb7..41b477d 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -806,7 +806,7 @@
{
data = Json::parse(jsonFile, nullptr, false);
}
- catch (Json::parse_error& e)
+ catch (const Json::parse_error& e)
{
log<level::DEBUG>("Corrupted channel config.",
entry("MSG=%s", e.what()));
diff --git a/user_channel/cipher_mgmt.cpp b/user_channel/cipher_mgmt.cpp
index ca9c2d4..8355865 100644
--- a/user_channel/cipher_mgmt.cpp
+++ b/user_channel/cipher_mgmt.cpp
@@ -106,7 +106,7 @@
{
data = Json::parse(jsonFile, nullptr, false);
}
- catch (Json::parse_error& e)
+ catch (const Json::parse_error& e)
{
log<level::ERR>("Corrupted cipher suite privilege levels config file.",
entry("MSG: %s", e.what()));
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index 6ae90fc..b36a2e6 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -1297,7 +1297,7 @@
}
}
}
- catch (Json::out_of_range& e)
+ catch (const Json::out_of_range& e)
{
// Key not found in 'userInfo'; possibly an old JSON file. Use
// default values for all payloads, and SOL payload default is true.