class Gherkin::UnexpectedTokenException

Public Class Methods

new(received_token, expected_token_types, state_comment) click to toggle source
Calls superclass method Gherkin::ParserException.new
# File lib/gherkin/errors.rb, line 31
def initialize(received_token, expected_token_types, state_comment)
  message = "expected: #{expected_token_types.join(", ")}, got '#{received_token.token_value.strip}'"
  column = received_token.location[:column]
  location =  (column.nil? || column.zero?) ? {line: received_token.location[:line], column: received_token.line.indent + 1} : received_token.location
  super(message, location)
end