catch exceptions as const

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I3a2943bbae131c4528a9bc487524beb31e850357
diff --git a/src/button_handler.cpp b/src/button_handler.cpp
index 6731e0f..6362f82 100644
--- a/src/button_handler.cpp
+++ b/src/button_handler.cpp
@@ -54,7 +54,7 @@
                               std::placeholders::_1));
         }
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         // The button wasn't implemented
     }
@@ -73,7 +73,7 @@
                           std::placeholders::_1));
         }
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         // The button wasn't implemented
     }
@@ -92,7 +92,7 @@
                           std::placeholders::_1));
         }
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         // The button wasn't implemented
     }
@@ -149,7 +149,7 @@
 
         bus.call(method);
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         log<level::ERR>("Failed power state change on a power button press",
                         entry("ERROR=%s", e.what()));
@@ -179,7 +179,7 @@
 
         bus.call(method);
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         log<level::ERR>("Failed powering off on long power button press",
                         entry("ERROR=%s", e.what()));
@@ -209,7 +209,7 @@
 
         bus.call(method);
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         log<level::ERR>("Failed power state change on a reset button press",
                         entry("ERROR=%s", e.what()));
@@ -252,7 +252,7 @@
         method.append(ledGroupIface, "Asserted", state);
         result = bus.call(method);
     }
-    catch (sdbusplus::exception::exception& e)
+    catch (const sdbusplus::exception::exception& e)
     {
         log<level::ERR>("Error toggling ID LED group on ID button press",
                         entry("ERROR=%s", e.what()));
diff --git a/src/gpio.cpp b/src/gpio.cpp
index 05b8e15..28eef92 100644
--- a/src/gpio.cpp
+++ b/src/gpio.cpp
@@ -104,7 +104,7 @@
             return true;
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("Error parsing GPIO JSON", entry("ERROR=%s", e.what()),
                         entry("GPIO_NAME=%s", gpioName.c_str()));
@@ -138,7 +138,7 @@
                             entry("GPIO_NAME=%s", gpioName.c_str()));
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("Error parsing GPIO JSON", entry("ERROR=%s", e.what()),
                         entry("GPIO_NAME=%s", gpioName.c_str()));
diff --git a/src/main.cpp b/src/main.cpp
index eb96b13..27f9b6f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -71,7 +71,7 @@
                 phosphor::logging::entry("RET=%d", ret));
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
         ret = -1;