catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2196fd0d1fad0901ea083371c8d2d07dfbe4ef78
diff --git a/include/threshold_alarm_event_monitor.hpp b/include/threshold_alarm_event_monitor.hpp
index 9b942f2..21cd29d 100644
--- a/include/threshold_alarm_event_monitor.hpp
+++ b/include/threshold_alarm_event_monitor.hpp
@@ -52,7 +52,7 @@
{
msg.read(assertValue);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
std::cerr << "error getting assert signal data from " << msg.get_path()
<< "\n";
@@ -164,7 +164,7 @@
conn->call(getSensorValue);
getSensorValueResp.read(sensorValue);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
std::cerr << "error getting sensor value from " << msg.get_path()
<< "\n";
@@ -204,7 +204,7 @@
sdbusplus::message::message getThresholdResp = conn->call(getThreshold);
getThresholdResp.read(thresholdValue);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
std::cerr << "error getting sensor threshold from " << msg.get_path()
<< "\n";