1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

catch exceptions as const ref

This commit is contained in:
Steffen Vogel 2020-08-17 17:09:55 +02:00
parent a42315585b
commit 006f1ba405
2 changed files with 2 additions and 2 deletions

View file

@ -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);
}
}

View file

@ -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;