diff --git a/lib/hooks/stats.cpp b/lib/hooks/stats.cpp index 16674f578..215e2f21c 100644 --- a/lib/hooks/stats.cpp +++ b/lib/hooks/stats.cpp @@ -206,7 +206,7 @@ public: if (f) { try { format = Stats::lookupFormat(f); - } catch (std::invalid_argument &e) { + } catch (const std::invalid_argument &e) { throw ConfigError(cfg, "node-config-hook-stats", "Invalid statistic output format: {}", f); } } diff --git a/src/villas-relay.cpp b/src/villas-relay.cpp index 9f168d16e..b7e3fc243 100644 --- a/src/villas-relay.cpp +++ b/src/villas-relay.cpp @@ -375,7 +375,7 @@ int Relay::protocol_cb(lws *wsi, enum lws_callback_reasons reason, void *user, v try { new (c) RelayConnection(wsi, r->loopback); } - catch (InvalidUrlException &e) { + catch (const InvalidUrlException &e) { lws_close_reason(wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR, (unsigned char *) "Invalid URL", strlen("Invalid URL")); return -1;