catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2196fd0d1fad0901ea083371c8d2d07dfbe4ef78
diff --git a/include/threshold_event_monitor.hpp b/include/threshold_event_monitor.hpp
index f1df9bd..cd5397a 100644
--- a/include/threshold_event_monitor.hpp
+++ b/include/threshold_event_monitor.hpp
@@ -57,7 +57,7 @@
msg.read(sensorName, thresholdInterface, event, assert,
assertValue);
}
- catch (sdbusplus::exception_t&)
+ catch (const sdbusplus::exception_t&)
{
std::cerr << "error getting assert signal data from "
<< msg.get_path() << "\n";
@@ -126,7 +126,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";
@@ -175,7 +175,7 @@
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";