catch exceptions as const

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: If18cc0293b52ce5f7f8e068688aa17d28ed27d50
diff --git a/command/open_session.cpp b/command/open_session.cpp
index a7b75bf..f88f433 100644
--- a/command/open_session.cpp
+++ b/command/open_session.cpp
@@ -83,7 +83,7 @@
             static_cast<cipher::integrity::Algorithms>(request->intAlgo),
             static_cast<cipher::crypt::Algorithms>(request->confAlgo));
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         response->status_code =
             static_cast<uint8_t>(RAKP_ReturnCode::INSUFFICIENT_RESOURCE);
diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
index 1413e6c..01e1117 100644
--- a/command/payload_cmds.cpp
+++ b/command/payload_cmds.cpp
@@ -92,7 +92,7 @@
         sol::Manager::get().startPayloadInstance(request->payloadInstance,
                                                  handler->sessionID);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(e.what());
         response->completionCode = IPMI_CC_UNSPECIFIED_ERROR;
@@ -159,7 +159,7 @@
         {
             activating(request->payloadInstance, sessionID);
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {
             log<level::INFO>(e.what());
             /*
@@ -171,7 +171,7 @@
             return outPayload;
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(e.what());
         response->completionCode = IPMI_CC_UNSPECIFIED_ERROR;
diff --git a/command/rakp12.cpp b/command/rakp12.cpp
index 1130ee9..b8dc17c 100644
--- a/command/rakp12.cpp
+++ b/command/rakp12.cpp
@@ -67,7 +67,7 @@
         session = session::Manager::get().getSession(
             endian::from_ipmi(request->managedSystemSessionID));
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("RAKP12 : session not found",
                         entry("EXCEPTION=%s", e.what()));
diff --git a/command/rakp34.cpp b/command/rakp34.cpp
index 59707d0..cfa2363 100644
--- a/command/rakp34.cpp
+++ b/command/rakp34.cpp
@@ -97,7 +97,7 @@
         session =
             session::Manager::get().getSession(request->managedSystemSessionID);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("RAKP12 : session not found",
                         entry("EXCEPTION=%s", e.what()));
diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp
index aa20941..8d3f663 100644
--- a/command/session_cmds.cpp
+++ b/command/session_cmds.cpp
@@ -103,7 +103,7 @@
             return ipmi::ccSuccess;
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("Failed in getting session state property",
                         entry("service=%s", service.c_str()),
@@ -154,7 +154,7 @@
             }
         }
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         log<level::ERR>("Failed to fetch object from dbus",
                         entry("INTERFACE=%s", session::sessionIntf),
@@ -198,7 +198,7 @@
             return session::ccInvalidSessionId;
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("Failed to get session manager instance",
                         entry("ERRMSG=%s", e.what()));
@@ -263,7 +263,7 @@
             session::Manager::get().getSession(handler->sessionID);
         currentSessionPriv = currentSession->currentPrivilege();
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         log<level::ERR>("Failed to fetch object from dbus",
                         entry("INTERFACE=%s", session::sessionIntf),
diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp
index 81dfc99..f8371fb 100644
--- a/command/sol_cmds.cpp
+++ b/command/sol_cmds.cpp
@@ -41,7 +41,7 @@
             request->packetSeqNum, request->packetAckSeqNum,
             request->acceptedCharCount, request->inOperation.ack, charData);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(e.what());
         return std::vector<uint8_t>();
diff --git a/sd_event_loop.cpp b/sd_event_loop.cpp
index 0022769..23f91e4 100644
--- a/sd_event_loop.cpp
+++ b/sd_event_loop.cpp
@@ -68,7 +68,7 @@
         auto reply = bus.call(req);
         reply.read(objs);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("getVLANID: failed to execute/read GetSubTree");
         return 0;
@@ -122,7 +122,7 @@
         auto method_reply = bus.call(method);
         method_reply.read(value);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("getVLANID: failed to execute/read VLAN Id");
         return 0;
diff --git a/sol/sol_context.cpp b/sol/sol_context.cpp
index f0e036c..4428c9c 100644
--- a/sol/sol_context.cpp
+++ b/sol/sol_context.cpp
@@ -281,7 +281,7 @@
         }
         enableAccumulateTimer(true);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(e.what());
     }
@@ -305,7 +305,7 @@
             enableAccumulateTimer(true);
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(e.what());
     }
diff --git a/sol/sol_manager.cpp b/sol/sol_manager.cpp
index 2102032..698159d 100644
--- a/sol/sol_manager.cpp
+++ b/sol/sol_manager.cpp
@@ -261,7 +261,7 @@
                 });
         }
     }
-    catch (sdbusplus::exception_t& e)
+    catch (const sdbusplus::exception_t& e)
     {
         log<level::ERR>(
             "Failed to get service path in registerSOLServiceChangeCallback");