Exception: GQL::Errors::SyntaxError

Inherits:
GQL::Error
  • Object
show all
Defined in:
lib/gql/errors.rb

Instance Attribute Summary

Attributes inherited from GQL::Error

#code, #handle

Instance Method Summary collapse

Methods inherited from GQL::Error

#as_json

Constructor Details

#initialize(lineno, value, token) ⇒ SyntaxError

Returns a new instance of SyntaxError.



99
100
101
102
103
104
# File 'lib/gql/errors.rb', line 99

def initialize(lineno, value, token)
  token = 'character' if token == 'error' || token == %Q{"#{value}"}
  msg = "Unexpected #{token}: `#{value}' (line #{lineno})."

  super(msg, 132, value)
end