Exception: Cucumber::CucumberExpressions::AmbiguousParameterTypeError
- Inherits:
-
CucumberExpressionError
- Object
- StandardError
- CucumberExpressionError
- Cucumber::CucumberExpressions::AmbiguousParameterTypeError
- Defined in:
- lib/cucumber/cucumber_expressions/errors.rb
Instance Method Summary collapse
-
#initialize(parameter_type_regexp, expression_regexp, parameter_types, generated_expressions) ⇒ AmbiguousParameterTypeError
constructor
A new instance of AmbiguousParameterTypeError.
Methods inherited from CucumberExpressionError
#build_message, #point_at, #point_at_located
Constructor Details
#initialize(parameter_type_regexp, expression_regexp, parameter_types, generated_expressions) ⇒ AmbiguousParameterTypeError
Returns a new instance of AmbiguousParameterTypeError.
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/cucumber/cucumber_expressions/errors.rb', line 205 def initialize(parameter_type_regexp, expression_regexp, parameter_types, generated_expressions) super(<<~ERROR) Your Regular Expression /#{expression_regexp.source}/ matches multiple parameter types with regexp /#{parameter_type_regexp}/: #{parameter_type_names(parameter_types)} I couldn't decide which one to use. You have two options: 1) Use a Cucumber Expression instead of a Regular Expression. Try one of these: #{expressions(generated_expressions)} 2) Make one of the parameter types preferential and continue to use a Regular Expression. ERROR end |