Exception: Cucumber::CucumberExpressions::CantEscape

Inherits:
CucumberExpressionError show all
Defined in:
lib/cucumber/cucumber_expressions/errors.rb

Instance Method Summary collapse

Methods inherited from CucumberExpressionError

#build_message, #point_at, #point_at_located

Constructor Details

#initialize(expression, index) ⇒ CantEscape

Returns a new instance of CantEscape.



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/cucumber/cucumber_expressions/errors.rb', line 65

def initialize(expression, index)
  super(
    build_message(
      index,
      expression,
      point_at(index),
      "Only the characters '{', '}', '(', ')', '\\', '/' and whitespace can be escaped",
      "If you did mean to use an '\\' you can use '\\\\' to escape it"
    )
  )
end