Skip to content

Commit a82649e

Browse files
committed
Catch std::logic_error and std::invalid_argument by const ref
1 parent 396a4f2 commit a82649e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/TodayTests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ TEST_F(TodayServiceCase, DeliverNextAppointmentChangeNoSubscriptionObject)
714714
{
715715
service->deliver("nextAppointmentChange", nullptr);
716716
}
717-
catch (std::invalid_argument& ex)
717+
catch (const std::invalid_argument& ex)
718718
{
719719
EXPECT_TRUE(ex.what() == "Missing subscriptionObject"sv) << "exception should match";
720720
exception = true;
@@ -732,7 +732,7 @@ TEST_F(TodayServiceCase, DeliverNextAppointmentChangeNoSubscriptionSupport)
732732
{
733733
service->deliver("nextAppointmentChange", nullptr);
734734
}
735-
catch (std::logic_error& ex)
735+
catch (const std::logic_error& ex)
736736
{
737737
EXPECT_TRUE(ex.what() == "Subscriptions not supported"sv) << "exception should match";
738738
exception = true;

0 commit comments

Comments
 (0)