catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia8f2ae95679f98f2fc3f32239bbf3b3578c35888
diff --git a/procedures/openfsi/scan.cpp b/procedures/openfsi/scan.cpp
index 48e00a3..c7543d1 100644
--- a/procedures/openfsi/scan.cpp
+++ b/procedures/openfsi/scan.cpp
@@ -52,7 +52,7 @@
file.open(path);
file << "1";
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
auto err = errno;
throw std::system_error(err, std::generic_category());
@@ -78,7 +78,7 @@
{
doScan(masterScanPath);
}
- catch (std::system_error& e)
+ catch (const std::system_error& e)
{
log<level::ERR>("Failed to run the FSI master scan");
@@ -104,7 +104,7 @@
{
doScan(hubScanPath);
}
- catch (std::system_error& e)
+ catch (const std::system_error& e)
{
// If the device driver is ever updated in the future to fail the sysfs
// write call on a scan failure then it should also provide some hints