Exception: ClickhouseRuby::Types::Parser::ParseError

Inherits:
Error
  • Object
show all
Defined in:
lib/clickhouse_ruby/types/parser.rb

Overview

Error raised when parsing fails

Instance Attribute Summary collapse

Attributes inherited from Error

#original_error

Instance Method Summary collapse

Constructor Details

#initialize(message, position: nil, input: nil) ⇒ ParseError

Returns a new instance of ParseError.



46
47
48
49
50
51
52
# File 'lib/clickhouse_ruby/types/parser.rb', line 46

def initialize(message, position: nil, input: nil)
  @position = position
  @input = input
  full_message = position ? "#{message} at position #{position}" : message
  full_message += ": '#{input}'" if input
  super(full_message)
end

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



44
45
46
# File 'lib/clickhouse_ruby/types/parser.rb', line 44

def input
  @input
end

#positionObject (readonly)

Returns the value of attribute position.



44
45
46
# File 'lib/clickhouse_ruby/types/parser.rb', line 44

def position
  @position
end