File tree Expand file tree Collapse file tree 9 files changed +33
-45
lines changed
Expand file tree Collapse file tree 9 files changed +33
-45
lines changed Original file line number Diff line number Diff line change 11#include " cucumber_cpp/library/Application.hpp"
22#include " cucumber_cpp/library/Context.hpp"
3- #include " cucumber_cpp/library/InternalError .hpp"
3+ #include " cucumber_cpp/library/Errors .hpp"
44#include " cucumber_cpp/library/StepRegistry.hpp"
55#include " cucumber_cpp/library/cucumber_expression/Errors.hpp"
66#include " cucumber_cpp/library/engine/ContextManager.hpp"
2121#include < algorithm>
2222#include < exception>
2323#include < filesystem>
24- #include < format>
2524#include < functional>
2625#include < iostream>
2726#include < iterator>
Original file line number Diff line number Diff line change @@ -5,18 +5,18 @@ add_library(cucumber_cpp.library STATIC ${CCR_EXCLUDE_FROM_ALL})
55target_sources (cucumber_cpp.library PRIVATE
66 Application.cpp
77 Application.hpp
8- BodyMacro.hpp
98 Body.hpp
9+ BodyMacro.hpp
1010 Context.hpp
11+ Errors.hpp
1112 HookRegistry.cpp
1213 HookRegistry.hpp
1314 Hooks.hpp
14- InternalError.hpp
1515 Rtrim.cpp
1616 Rtrim.hpp
17- Steps.hpp
1817 StepRegistry.cpp
1918 StepRegistry.hpp
19+ Steps.hpp
2020 TagExpression.cpp
2121 TagExpression.hpp
2222 TagsToSet.hpp
Original file line number Diff line number Diff line change 1+ #ifndef LIBRARY_ERRORS_HPP
2+ #define LIBRARY_ERRORS_HPP
3+
4+ #include < stdexcept>
5+
6+ namespace cucumber_cpp ::library
7+ {
8+ struct InternalError : std::runtime_error
9+ {
10+ using runtime_error::runtime_error;
11+ };
12+
13+ struct UnsupportedAsteriskError : std::runtime_error
14+ {
15+ using runtime_error::runtime_error;
16+ };
17+ }
18+
19+ #endif
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#include " cucumber_cpp/library/TagExpression.hpp"
2- #include " cucumber_cpp/library/InternalError .hpp"
2+ #include " cucumber_cpp/library/Errors .hpp"
33#include < functional>
44#include < regex>
55#include < set>
Original file line number Diff line number Diff line change 1313#include " cucumber/messages/scenario.hpp"
1414#include " cucumber/messages/step.hpp"
1515#include " cucumber/messages/tag.hpp"
16- #include " cucumber_cpp/library/InternalError .hpp"
16+ #include " cucumber_cpp/library/Errors .hpp"
1717#include " cucumber_cpp/library/StepRegistry.hpp"
1818#include " cucumber_cpp/library/TagExpression.hpp"
1919#include " cucumber_cpp/library/engine/FeatureInfo.hpp"
Original file line number Diff line number Diff line change 11#ifndef ENGINE_STRINGTO_HPP
22#define ENGINE_STRINGTO_HPP
33
4- #include " cucumber_cpp/library/InternalError .hpp"
4+ #include " cucumber_cpp/library/Errors .hpp"
55#include < algorithm>
66#include < any>
77#include < cctype>
8- #include < source_location>
98#include < sstream>
109#include < string>
1110#include < string_view>
@@ -15,18 +14,18 @@ namespace cucumber_cpp::library::engine
1514{
1615
1716 template <class To >
18- inline To StringTo (const std::string& s, std::source_location sourceLocation = std::source_location::current() )
17+ inline To StringTo (const std::string& s)
1918 {
2019 std::istringstream stream{ s };
2120 To to;
2221 stream >> to;
2322 if (stream.fail ())
24- throw InternalError{ " Cannnot convert parameter \" " + s + " \" " , sourceLocation };
23+ throw InternalError{ " Cannnot convert parameter \" " + s + " \" " };
2524 return to;
2625 }
2726
2827 template <>
29- inline std::string StringTo<std::string>(const std::string& s, std::source_location /* sourceLocation */ )
28+ inline std::string StringTo<std::string>(const std::string& s)
3029 {
3130 return s;
3231 }
@@ -46,7 +45,7 @@ namespace cucumber_cpp::library::engine
4645 }
4746
4847 template <>
49- inline bool StringTo<bool >(const std::string& s, std::source_location /* sourceLocation */ )
48+ inline bool StringTo<bool >(const std::string& s)
5049 {
5150 using details::iequals;
5251
Original file line number Diff line number Diff line change 22#define ENGINE_TABLE_HPP
33
44#include " cucumber_cpp/library/engine/StringTo.hpp"
5- #include < source_location>
65#include < string>
76#include < utility>
87#include < vector>
@@ -12,9 +11,9 @@ namespace cucumber_cpp::library::engine
1211 struct TableValue
1312 {
1413 template <class T >
15- T As (std::source_location sourceLocation = std::source_location::current() ) const
14+ T As () const
1615 {
17- return StringTo<T>(value, sourceLocation );
16+ return StringTo<T>(value);
1817 }
1918
2019 explicit TableValue (std::string value)
Original file line number Diff line number Diff line change 1- #include " cucumber_cpp/library/InternalError .hpp"
1+ #include " cucumber_cpp/library/Errors .hpp"
22#include " cucumber_cpp/library/engine/StringTo.hpp"
33#include " gmock/gmock.h"
44#include " gtest/gtest.h"
You can’t perform that action at this time.
0 commit comments