summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2021-10-06 20:39:54 +0300
committerPatrick Williams <patrick@stwcx.xyz>2021-10-06 20:39:54 +0300
commitc5967048de7c5361b1537af47768a87ffb463d28 (patch)
tree3af817b73274e90b7073272b2c7d72ae8156c185 /src
parentd32c4fa936f9a88fc1dd124201ed11a6a90a18c5 (diff)
downloadbmcweb-c5967048de7c5361b1537af47768a87ffb463d28.tar.xz
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I93925bf34b4fec181a56d6524cbe9c6182a16b1f
Diffstat (limited to 'src')
-rw-r--r--src/crow_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crow_test.cpp b/src/crow_test.cpp
index a6852203a2..0df05d2ad7 100644
--- a/src/crow_test.cpp
+++ b/src/crow_test.cpp
@@ -58,7 +58,7 @@ TEST(Crow, Rule)
r.validate();
fail("empty handler should fail to validate");
}
- catch (runtime_error& e)
+ catch (const runtime_error& e)
{}
int x = 0;
@@ -412,7 +412,7 @@ TEST(Crow, server_handling_error_request)
c.receive(asio::buffer(buf, 2048));
fail();
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
// std::cerr << e.what() << std::endl;
}
@@ -891,7 +891,7 @@ TEST(Crow, routeDynamic)
app.routeDynamic("/invalid_test/<double>/<path>")([]() { return ""; });
fail();
}
- catch (std::exception&)
+ catch (const std::exception&)
{}
// app is in an invalid state when routeDynamic throws an exception.
@@ -900,7 +900,7 @@ TEST(Crow, routeDynamic)
app.validate();
fail();
}
- catch (std::exception&)
+ catch (const std::exception&)
{}
{