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()));