catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib9f55b5a26f9a48838759cfaef73c44181242ac6
diff --git a/gpio-util/main.cpp b/gpio-util/main.cpp
index 0cfacf4..82cbed4 100644
--- a/gpio-util/main.cpp
+++ b/gpio-util/main.cpp
@@ -177,7 +177,7 @@
{
function->second(gpio, delay);
}
- catch (std::runtime_error& e)
+ catch (const std::runtime_error& e)
{
std::cerr << e.what();
return -1;
diff --git a/gpioMonMain.cpp b/gpioMonMain.cpp
index 4b8b052..f8084a3 100644
--- a/gpioMonMain.cpp
+++ b/gpioMonMain.cpp
@@ -59,7 +59,7 @@
{
app.parse(argc, argv);
}
- catch (CLI::Error& e)
+ catch (const CLI::Error& e)
{
return app.exit(e);
}
diff --git a/presence/gpio_presence.cpp b/presence/gpio_presence.cpp
index 2c448da..765ca55 100644
--- a/presence/gpio_presence.cpp
+++ b/presence/gpio_presence.cpp
@@ -216,7 +216,7 @@
file << device;
file.close();
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
auto err = errno;