catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4412e90042b0d216025027be72a6d0e88dad766e
diff --git a/libpfr/src/pfr.cpp b/libpfr/src/pfr.cpp
index abced98..77320fa 100644
--- a/libpfr/src/pfr.cpp
+++ b/libpfr/src/pfr.cpp
@@ -305,7 +305,7 @@
{
gpioLine.request({__FUNCTION__, gpiod::line_request::DIRECTION_INPUT});
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(
"Failed to request the GPIO line",
@@ -317,7 +317,7 @@
{
*value = gpioLine.get_value();
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(
"Failed to get the value of GPIO line",