From 0ee2574fa67e76eee6dc04c2400d7cc73077a03f Mon Sep 17 00:00:00 2001 From: "Timmer, Daan" Date: Wed, 24 Jan 2024 15:41:02 +0000 Subject: [PATCH] chore: resolved sonar warnings --- cucumber-cpp/FeatureRunner.cpp | 9 ++++++++- cucumber-cpp/TagsToSet.hpp | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cucumber-cpp/FeatureRunner.cpp b/cucumber-cpp/FeatureRunner.cpp index 0ba6f5c..ddd31ae 100644 --- a/cucumber-cpp/FeatureRunner.cpp +++ b/cucumber-cpp/FeatureRunner.cpp @@ -30,7 +30,14 @@ namespace cucumber_cpp FeatureRunnerV2::~FeatureRunnerV2() { - stopFeatureOnDestruction(); + try + { + stopFeatureOnDestruction(); + } + catch (...) + { + std::cout << "\nexception caught during FeatureRunner dtor"; + } } const FeatureSource& FeatureRunnerV2::Source() const diff --git a/cucumber-cpp/TagsToSet.hpp b/cucumber-cpp/TagsToSet.hpp index 7070f64..9b1b38b 100644 --- a/cucumber-cpp/TagsToSet.hpp +++ b/cucumber-cpp/TagsToSet.hpp @@ -10,8 +10,7 @@ namespace cucumber_cpp { std::set> TagsToSet(const auto& tags) { - decltype(TagsToSet(tags)) result; - // std::set> result; + std::set> result; for (const auto& entry : tags) result.insert(entry.name);