Fix compiler warnings (-Wcatch-value=)

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
Ferry Huberts 2023-08-04 15:03:33 +02:00
parent ea81112c29
commit ac25e6c982

View File

@ -446,7 +446,7 @@ void ObjectTest::onRun() {
try{
dto["type"] = oatpp::Int32(32);
} catch(std::runtime_error e) {
} catch(std::runtime_error const& e) {
OATPP_LOGD(TAG, "error='%s'", e.what());
thrown = true;
}
@ -464,7 +464,7 @@ void ObjectTest::onRun() {
try{
dto["non-existing"];
} catch(std::out_of_range e) {
} catch(std::out_of_range const& e) {
OATPP_LOGD(TAG, "error='%s'", e.what());
thrown = true;
}